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
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
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
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..
not really
ive never hit a case where sorting by asc doesnt work?
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
i dont know what the problem is, you're describing expected behaviour in my eyes
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..
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?
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...
that is absolutely an opinion
How is that an opinion
especially created_at
its completely contextual based on what the app serves as
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.