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 ?
4 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
Want results from more Discord servers?
Add your server