F
Filament4mo ago
ericmp

How to set a Default Group With Descending Order By Default

In my table Im grouping. But i want the default order to be Desc instead of Asc. Is there a way to achieve it?
->groups([
Tables\Grouping\Group::make('game_reservation_id'),
])
->defaultGroup('game_reservation_id')
->groups([
Tables\Grouping\Group::make('game_reservation_id'),
])
->defaultGroup('game_reservation_id')
4 Replies
ericmp
ericmpOP4mo ago
i tried ->defaultGroup('game_reservation_id', 'desc'), but doesnt do anything (not sure what to try) bump
toeknee
toeknee4mo ago
What if you set it in defaultSort() Ahh I see, it doesnt' exist but actually it would make sense to add it I am sure a PR would be welcomed.
ericmp
ericmpOP4mo ago
oh okay so im trying to do something that doesnt exist :v np
toeknee
toeknee4mo ago
Yep!
Want results from more Discord servers?
Add your server