© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•3y ago•
4 replies
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
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
defaultSort
on the
Group::make
Group::make
Solution
Totaly missed this in the docs.

https://filamentphp.com/docs/3.x/tables/grouping#customizing-the-eloquent-query-ordering-behaviour
Grouping rows - Table Builder - Filament
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Default sort direction on table groups
FilamentFFilament / ❓┊help
2y ago
Collapse table groups by default
FilamentFFilament / ❓┊help
2y ago
Table Groups Rows collapsed by default.
FilamentFFilament / ❓┊help
2y ago
Collapse All Table Row Groups By Default
FilamentFFilament / ❓┊help
2y ago