Ascending and descending sortable option overriding options of sortable columns

How can I go about fixing this considering each time someone wants to pick an option to sort by, the ascending and descending option overrides their option. And in order for their to be a change in what is sortable they also have to pick an ascending or descending option that complies with it.
13 Replies
Andrew Wallo
Andrew WalloOP2y ago
This makes it pointless for people to have sortable columns if they do not change unless changing ascending or descending as well.. Only resolution for something like this would for the default sort direction to be null not asc
Dan Harrin
Dan Harrin2y ago
null would mean no sort at all so the sort wouldnt work at all meaning its 2 clicks every time instead of only half the time
Andrew Wallo
Andrew WalloOP2y ago
Yeah but do you understand what I am saying though? I guess there is no other way idk I could also say that the sortable columns don't work at all if ascending and descending exists... They could work if also sorting by ascending or descending but that takes away the point of having columns to be sortable..
Dan Harrin
Dan Harrin2y ago
not really ive never hit a case where sorting by asc doesnt work?
Andrew Wallo
Andrew WalloOP2y ago
So if I sort by created at then it would be oposite of created at If decending is there then if I sort by name it would be opposite alphabetical order
Dan Harrin
Dan Harrin2y ago
i dont know what the problem is, you're describing expected behaviour in my eyes
Andrew Wallo
Andrew WalloOP2y ago
How is that expected though? I guess in my eyes if I sort by name then that means alphabetically, but if descending option is there than it is opposite of alphabetically. If I am trying to sort by created at then that would mean by what was last created first... but if ascending option is there than it would sort by first created..
Dan Harrin
Dan Harrin2y ago
but its ascending by default what happens if you want to see the oldest record instead of the newest? why should filament have an opinion on that?
Andrew Wallo
Andrew WalloOP2y ago
Sorting by name is objectively alphabetical though. It isn't an opinion? Same goes for sorting by created at... It is objectively by what was last created. It isn't an opinion...
Dan Harrin
Dan Harrin2y ago
that is absolutely an opinion
Andrew Wallo
Andrew WalloOP2y ago
How is that an opinion
Dan Harrin
Dan Harrin2y ago
especially created_at its completely contextual based on what the app serves as
Andrew Wallo
Andrew WalloOP2y ago
Okay I can see created at in certain cases so I agree with you on that... So I guess there really isn't any way to handle this case scenario. Nevermind then, thank you for your time.
Want results from more Discord servers?
Add your server