[3.2.0] Filter components doesn't update / generate blur event
Hello. We are using DatePicker in filter like this:
After updating to 3.2.0 it breaks.
If I update date filter - nothing happens. When I select text field and leave it - update triggers.
v3.2.0 changed filters here: https://github.com/filamentphp/filament/blob/a1fe2b159e94c9e0a6bf7405001eff074e3df4eb/packages/tables/src/Concerns/HasFilters.php#L35
In my specific scenario I tried adding
live()
on DatePicker
, but it also happens when using toggle()
, where I'm not in control of form elements.
Is this a bug? If not, what's the easiest way to override this behavior in whole application?Solution:Jump to solution
GitHub
fix: Live filters by danharrin · Pull Request #10825 · filamentphp/...
In v3.2, we made all filters affect the table content on blur, instead of immediately. However, some fields do not have full support for blur, so we are reverting this change for now.
Fixes #10819.
13 Replies
Could you open an issue please?
I have the same issue with a SelectFilter after updating to 3.2...
sounds like a bug with the date picker, that has just come to attention since we moved from live events to blur
to be clear, does it work once you blur the input? that was deliberate...
I'm sorry. I thought it was for a TableFilter. These won't work anymore. Just any filter doesn't update the data. Only the state in e.g. the URL.
i dont think i understand?
After updating to 3.2. this filters won't work. They update the status in the URL, but not the data in the table.
Yeah, I would expect something like that 🙂
without being able to replicate, i dont know if i can help? can you either find a place in the demo where it doesnt work, or create a reproduction repository
Demo in the works
GitHub
Comparing filamentphp:main...saulens22:3.2.0-break · filamentphp/demo
Source code for the demo.filamentphp.com website. Contribute to filamentphp/demo development by creating an account on GitHub.
Solution
GitHub
fix: Live filters by danharrin · Pull Request #10825 · filamentphp/...
In v3.2, we made all filters affect the table content on blur, instead of immediately. However, some fields do not have full support for blur, so we are reverting this change for now.
Fixes #10819.