© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•2y ago•
2 replies
Victor Pennington

Applying Filters using $table->headerActions()

Hi, I have a quick question:

If I have a table with a filter like:
$table
  (...)
  ->filters([
        Tables\Filters\Filter::make('today')
        ->query(fn (Builder $query) => $query->whereDate('inbound_appointment', Carbon::today())),
        ])
$table
  (...)
  ->filters([
        Tables\Filters\Filter::make('today')
        ->query(fn (Builder $query) => $query->whereDate('inbound_appointment', Carbon::today())),
        ])


Is it possible to apply this filter from an outside action, like a headerAction in the same table, for example:

$table
  ->filters(...same as above...)
  ->headerActions([ 
    Action::make('today')
      ->action(fn($table) => $table->getFilter('today') !!! some method here like "->apply()" !!!)
    ])
$table
  ->filters(...same as above...)
  ->headerActions([ 
    Action::make('today')
      ->action(fn($table) => $table->getFilter('today') !!! some method here like "->apply()" !!!)
    ])


Basically, I want to be able to manipulate the table filters using methods on the table.
Any ideas?
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

Chain table headerActions
FilamentFFilament / ❓┊help
7mo ago
Change text of table body before applying filters
FilamentFFilament / ❓┊help
2y ago
Table filters result
FilamentFFilament / ❓┊help
10mo ago