Table filter delay or submit

Hello, as mentioned in the title, i want to make table filter only firing event after certain delay or after a submit button is clicked on the form, is this possible ?
5 Replies
Patrick Boivin
Hi @shinra5252, I don't think there's a simple solution (like a setting...), but I think you can accomplish this by using a custom form for your filters: https://filamentphp.com/docs/2.x/tables/filters#custom-filter-forms Here's a quick example:
Filter::make('state')
->form([
Select::make('state')
->options([ ... ])
->stateBindingModifiers(['debounce.1s']),
])
Filter::make('state')
->form([
Select::make('state')
->options([ ... ])
->stateBindingModifiers(['debounce.1s']),
])
Adding a 'submit' button would require customizing some of the internal Blade views...
Shinra
ShinraOP2y ago
hey thanks ! i will try it tomorrow, 1 question though, i cant find stateBindingModifiers in the documentation, is there any other place to learn filament ?
Patrick Boivin
Yeah, this is not in the documentation... maybe it's more like an internal thing. I found it looking around in the source code, trying to solve a different problem.
Shinra
ShinraOP2y ago
thank you for sharing this
hgms
hgms2mo ago
For anyone converting from Filament v2 to v3 (and hence Livewire v3) you have to add live to this modifier, ie live.debounce.1000ms.

Did you find this page helpful?