F
Filament14mo ago
d3v1anX

Default sort direction based on defaultgroup in table builder

Hey guys, just wonder how I can use a defaultGroup in table builder with a default sort direction - is there no option?
return $table
->groups([
Group::make('start')->label('Start date (UTC)')->date(),
])
->defaultGroup('start') // how to set Desc as default? :D
return $table
->groups([
Group::make('start')->label('Start date (UTC)')->date(),
])
->defaultGroup('start') // how to set Desc as default? :D
thanks in advance!
3 Replies
toeknee
toeknee14mo ago
Try: ->defaultSort('start', 'desc') But I am not sure it will do it
d3v1anX
d3v1anXOP14mo ago
Hey toeknee, thank you for the quick response. I tried, but unfortunately it won’t order the group like the dropdown does 🙂 this only sorts the entries within the groups :/
toeknee
toeknee14mo ago
I thought that would be the case tbh. I am not sure
Want results from more Discord servers?
Add your server