Skip to content

Commit

Permalink
add event filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Boy132 committed Jan 24, 2025
1 parent 3c87e41 commit 976bd19
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Filament\Resources\Pages\ListRecords;
use Filament\Tables\Actions\ViewAction;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Filters\SelectFilter;
use Filament\Tables\Table;
use Illuminate\Support\HtmlString;

Expand Down Expand Up @@ -67,6 +68,12 @@ public function table(Table $table): Table
KeyValue::make('properties')
->label('Metadata'),
]),
])
->filters([
SelectFilter::make('event')
->options(fn (Table $table) => $table->getQuery()->pluck('event', 'event')->unique()->sort())
->searchable()
->preload(),
]);
}

Expand Down

0 comments on commit 976bd19

Please sign in to comment.