Skip to content

Commit

Permalink
add defaultSort config option
Browse files Browse the repository at this point in the history
  • Loading branch information
RickDBCN committed Aug 16, 2023
1 parent 799e04e commit b03b6b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/filament-email.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
'resource' => [
'group' => null,
'sort' => null,
'default_sort_column' => 'created_at',
'default_sort_direction' => 'desc'
],

'keep_email_for_days' => 60,
Expand Down
1 change: 1 addition & 0 deletions src/Filament/Resources/EmailResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ public static function form(Form $form): Form
public static function table(Table $table): Table
{
return $table
->defaultSort(config('filament-email.resource.default_sort_column'), config('filament-email.resource.default_sort_direction'))
->actions([
Action::make('resend')
->label(__('Send again'))
Expand Down

0 comments on commit b03b6b7

Please sign in to comment.