Victor Pennington
Victor Pennington
FFilament
Created by Victor Pennington on 8/31/2024 in #❓┊help
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?
3 replies
FFilament
Created by Victor Pennington on 2/29/2024 in #❓┊help
Is it possible to Collapsible Panel using recordAction()?
No description
2 replies