Desired Feature Using a header button, the ‘company’ filter is toggled on and off with a custom option (“Google”).
Multiple Selection Filter Example /* Company filter is applied to the 'company' field on the Company model Table function defined in the CompanyResource.php file as created by Filament */ namespace App\Filament\Resources; public static function table(Table $table): Table { return $table ->headerActions([ Tables\Actions\Action::make('google_filter') ->badge() ->label('Google') ->icon(fn (ListRecords|TableWidget $livewire) => in_array(Companies::Google->value, Arr::get($livewire->tableFilters ?? [], 'company.values', [])) ? 'heroicon-s-funnel' : 'heroicon-o-funnel' ) ->action(fn (ListRecords|TableWidget $livewire) => self::buttonFilterApply($livewire, 'company', Companies::Google->value)), Tables\Actions\Action::make('apple_filter') ->badge() ->label('Apple') ->icon(fn (ListRecords|TableWidget $livewire) => in_array(Companies::Apple->value, Arr::get($livewire->tableFilters ?? [], 'company.values', [])) ? 'heroicon-s-funnel' : 'heroicon-o-funnel' ) ->action(fn (ListRecords|TableWidget $livewire) => self::buttonFilterApply($livewire, 'company', Companies::Apple->value)), ]) ->filters([ SelectFilter::make('company') ->multiple() ->native(false) ->options(Companies::class), ]) ->columns([ TextColumn::make('name'), TextColumn::make('job_title'), TextColumn::make('location'), TextColumn::make('company'), ]); } private static function buttonFilterApply(ListRecords|TableWidget $livewire, string $filter, string $option): void { $filter_value = (array) Arr::get($livewire->tableFilters ?? [], $filter, []); if (empty($filter_value)) { return; } if (in_array($option, $filter_value['values'])) { $livewire->tableFilters[$filter]['values'] = array_diff($filter_value['values'], [$option]); } else { $livewire->tableFilters[$filter]['values'][] = $option; } } Single Selection Filter Example ...