non-automatic filters

I need to change the behavior of the filters. Currently, as soon as I change any filter option, the data is directly recalculated. Instead I would need to add a button that recalculates the data based on the filter options when clicked. Like the reset filter button, but with a different behavior. any suggestions? Thanks in advance
14 Replies
Patrick Boivin
Patrick Boivin16mo ago
It's possible... but not easy. You need to use custom filters, specifically to customize the form fields and add the defer Livewire modifiers. Adding the "Apply" button is pretty trivial when you get to this point.
malebestia.
malebestia.OP16mo ago
Could you please give me some examples?
malebestia.
malebestia.OP16mo ago
@Patrick Boivin I can't figure out how to do it, I'll offer you 50 dollars if we connect with skype and you create the button for me, what do you say? it should be small stuff for you, right?
Patrick Boivin
Patrick Boivin16mo ago
I don't have much time at the moment, but I appreciate the offer. I can look into it tomorrow morning and provide you with a full example, how about that? Then, if you're happy with it, you can make a one-time donation to Dan Harrin on Github, sound good?
malebestia.
malebestia.OP16mo ago
ok
Patrick Boivin
Patrick Boivin16mo ago
Give me a minute... Just making sure: you are on Filament v2, right? @malebestia There it is: https://github.com/pboivin/f2-wip/tree/deferred-filters
Patrick Boivin
Patrick Boivin16mo ago
Patrick Boivin
Patrick Boivin16mo ago
Let me know if you can make a donation to the project. No worries if not 👍
Kenneth Sese
Kenneth Sese16mo ago
Nicely done! Simple and elegant. I’ve seen this requested a lot of times. Hopefully everyone who uses this will donate $50 to Dan!
malebestia.
malebestia.OP15mo ago
Patrick Boivin
Patrick Boivin15mo ago
Can you share the output of php artisan about
malebestia.
malebestia.OP15mo ago
Patrick Boivin
Patrick Boivin15mo ago
Can you click SHARE at the top of this page and share the link with me? You can share privately if it's better for you. Got the link, thanks @malebestia I think the issue is that you're calling stateBindingModifiers() on the Filter The call should go on the Select component, inside of the extended DeferredSelectFilter class https://github.com/pboivin/f2-wip/commit/ad2567402dd6e7c5c7098d306a5d05042035d229#diff-10a1936b46b817421c9d376f4e9a62582d2085da2ff121b6439d1ff7ff70c046R13
Want results from more Discord servers?
Add your server