update actions on filter change
How can i update an action, when a filter is changed?
I have an action, which is showing in a table column. The action shows labels with links, depending on the selection in the form of the filter.
My problem is, that if i change the filter, the actions are not updated.
I have to make a cmd-r reload of the page, to force a new calculation of the action label.
How can i resolve this please?
6 Replies
use a closure to access the
$tableFilters
livewire property
then do whatever you want with this informationthanks @saadeguilherme Thank you very much! I am new. Could you please help me where to put this as a small example please?
how's your url looking like?
copy-paste here please
https://reservas.test/admin/crear-reserva?tableFilters[Center][centerId]=475&tableFilters[Center][reservableItemId]=465&tableFilters[Center][userId]=30
If the userId is changing, i need the Action to "recalculate".
in your case, replace
request()->input('tableFilters.Center.userId')
in your code with:
Works Perfect @saadeguilherme !! 🤩 Wow. Really great!!! Thanks very very much.