Parameter being null after table action
I have a widget that refreshes the page with a custom parameter. I use this parameter to manipulate a different widget, which needs a page refresh. And to update the getTableQuery method.
This is working fine on the initial loading of the page, as you would expect the Request::query('location') is present and it applies the correct filters. The problem comes when trying to do a table action like delete, restore or any custom action. Then it is null, as i can see using the dd method. Why might this be and how can i make it so it will detect the location.
5 Replies
it's how livewire works. you don't have the request. can't you use native table filters?
I need to reload the page for the mapping tool, I could not find a good way achieve this using the native filters. Maybe if there is a way to change the table filters from the inside of the widget on load it could work.
What do you need to map? You return two times query without params so no filters. Add filters for other conditions
The two times query without params are for when there is no location yet created, or for when the location parameter is all
which means no filters selected