Interecting livewire components with resource table.
I have a Model called as Assets. An assets can have pending, archieved or published status. For UX purpose, I added in a livewire components as a widget to perform a 'global search' for user.
In the livewire component, I used a hacky way to hook onto the Asset resource's searchable. Basically, when a user click 'search (cari)' at the widget, it will redirect the user to Asset Resource index page with the search query params as below.
Besides, due to requirements, Asset Resource should be filtered by published status as default but with the global search, users can see any Assets with any status. So in the Asset resources, i have this modifyQueryUsing to check if the current request has tableFilters, if does not exists, it will filter by the status as published.
Here's the issue, when i clicked on page 2 of the table, it seems like the callback in modifyQueryUsing does not detect the request is having the tableFilters, and it filtered the Asset by status published. But in the browsers URL the search query params are still in place.
Is there any proper way to solve this issue or any hacky way to it?
Let me know if I needed to share my livewire component's code as well.
1 Reply
Up
bump