sorting issue after quic search

tumanek

New member
Salve!
I've created a grid based on your MOVIE example. Works well - sorting is based on ID - desc, but:
when I try to use quick search and then clear all filter the sorting order works always ASC.
Do you see my mistake or it is a bug?
Regards
Tomek
Dadabik 10.6
 

tumanek

New member
10.6-Manarola released on 26-01-2021

System info
PHP Version: 7.4.16

mysql version: 5.5.5-10.4.18-MariaDB

Web server: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.4.16

Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
 

eugenio

Administrator
Staff member
Hello,
I am not sure I have understood the problem; can you provide a step-by-step guide to reproduce the behaviour on one of our online demo?

Best,
 

tumanek

New member
Salve Eugenio,
Please check your Movie library demo:
logged as a root
1. Click "Movies" - you should see "Casablanka" in the first row. of the customized grid.
2. In the search filter choose an director for ex. Dennis Hooper
3. You should see "Easy Rider"
4. Clear all filters (remove search filter)
5. You will see a Space Odyssey:) -not Casablanca - even if you will go to the menu and click Movies - the sorting is different
Regards
Tomek
 

eugenio

Administrator
Staff member
Hello,
when you said "Works well - sorting is based on ID" you mean you set the default sort in the admin-pages section?

Best,
 

tumanek

New member
Eugenio,
yes - it is set in admin-pages section (DESC)
after searching and cearing filters sorting works in ASC
Regards
(see your eample, it works similar)
Regards
 

eugenio

Administrator
Staff member
Ok, I see what you mean now.
When you click on "remove search filter", DaDaBIK also reset the "order by" clause (if any).
It would probably be better to avoid this, at the moment I don't see any reason why the user should reset the "order by" clause; I will think about it and in case I'll modify this behaviour in the next release.

Thanks for having reported it.

Best,
 
Top