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
toeknee9mo ago
Try: ->defaultSort('start', 'desc') But I am not sure it will do it
d3v1anX
d3v1anX9mo 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
toeknee9mo ago
I thought that would be the case tbh. I am not sure
Want results from more Discord servers?
Add your server
More Posts