Update table filters based on search query?

Hello, I have been trying to update my filters based on the search query that is entered. I tried using the ->afterStateUpdated(function ($state) use ($table) {} on my filters, but it only seems to work for other filters. The search query does not seem to affect the state / call the afterStateUpdated method for the filters. Is there any way to call the the afterStateUpdated on the filters from another part of my code, for example from applySearchToTableQuery ? In case the question is unclear, the goal is to have someone enter a city name ('e.g. Venice'), and updating the country filters so that only applicable options are shown.
2 Replies
krekas
krekas4mo ago
I don't understand where are you trying to update.
thijzie
thijzie4mo ago
I am using a Filament Table in a seperate Livewire Component. Some of the table columns can be searched (->searchable()) . The table also has filters. I want the filters to be updated based on a search query. In the screenshot, if I type query as a search term (1) I want the filter values (2) to be updated with a query that contains the search term.
No description