You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using custom form filters in tables, live() fields bypass the deferFilters() setting, causing the query to rerun immediately after the field is modified.
This issue seems to occur because the deferFilters() mechanism relies on the live() property, as seen in the following filament code:
Line 36 of filament/tables/src/Concerns/HasFilters.php
Not sure if related, but seems when you have a custom action on your Resource getHeaderActions() method , the action can't access the live updated table filters values, i have to refresh manually the page so the the action sees the changes in the filters
Package
filament/filament
Package Version
v3.2.124
Laravel Version
v11.0
Livewire Version
No response
PHP Version
PHP 8.3.0
Problem description
When using custom form filters in tables,
live()
fields bypass thedeferFilters()
setting, causing the query to rerun immediately after the field is modified.This issue seems to occur because the
deferFilters()
mechanism relies on thelive()
property, as seen in the following filament code:Line 36 of
filament/tables/src/Concerns/HasFilters.php
Expected behavior
I expect deferFilters() to be independent of the content of my filter form. For example, I'm using dynamic type properties in my filter form (https://filamentphp.com/docs/3.x/forms/advanced#dynamic-fields-based-on-a-select-option), and live() property is very much needed (if you know a workaround to make it working without live(), please share).
Steps to reproduce
Reproduction repository (issue will be closed if this is not valid)
https://github.com/davide-alpi/filament-issue-defer-filters
Relevant log output
No response
The text was updated successfully, but these errors were encountered: