In Laravel Nova, I am able to sort fields of a resource from descending and ascending order, however, after that I can’t click on the field’s name in the table heading to sort it back from descending to ascending. Is there a way to resolve this?
I’d also like to ask if there is a way to add a clear state for sorting, if ascending and descending are representing by arrows in the table heading, in the middle, I want to add a “-” which will help the user clear the order which will default the ordering to desc by id, is this possible?
It seems like this only works for BelongsTo() field in my case where the user can switch back and forward, but for other fields, the user can only switch from asc to desc, and then they’re stuck and can’t click to switch back from desc to asc. I’ve searched for solutions and it seems that people are suggesting to override the indexQuery(), however, that did not work.