F
Filament12mo ago
Tieme

Table groups change default sort

I have a table with groups, the groups is a date group. I want to hide the settings because it is only one group, that works. Now i want to change the default sort of the group from asc to desc The defaultSort on the table does not work, how can i set this on the group? Below is my table,
return $table
->columns([

])
->emptyStateActions([
Tables\Actions\CreateAction::make(),
])
->defaultGroup('date')
->groups([
Tables\Grouping\Group::make('date')
->collapsible(true)
->date(true),
])
->groupingSettingsHidden()
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y',
])
->defaultSort('date', 'desc');
return $table
->columns([

])
->emptyStateActions([
Tables\Actions\CreateAction::make(),
])
->defaultGroup('date')
->groups([
Tables\Grouping\Group::make('date')
->collapsible(true)
->date(true),
])
->groupingSettingsHidden()
->configure([
Table::$defaultDateDisplayFormat = 'l d F Y',
])
->defaultSort('date', 'desc');
i cant find any defaultSort on the Group::make
2 Replies
ejat
ejat11mo ago
hi, so how you solve it? i cant found the option to change from asc to desc
Want results from more Discord servers?
Add your server