Use value from first select filter to limit results in second select filter
I've got the standard city, state, country setup and can access all the relevant details in the table itself.
What I'm hoping to do is in the city table I have 2 select filters. 1 for country and one for state. I'd like it so that once they select a country it reduces the options in the state select to only have states from that country. I know I can customize the relationship callback for the select filter but how can I access the value selected in the first select?
What I'm hoping to do is in the city table I have 2 select filters. 1 for country and one for state. I'd like it so that once they select a country it reduces the options in the state select to only have states from that country. I know I can customize the relationship callback for the select filter but how can I access the value selected in the first select?
Solution
Using a Filter Form you should be able to use get, see how it was acheived here:
https://github.com/filamentphp/filament/discussions/2891
https://github.com/filamentphp/filament/discussions/2891
GitHub
It would be awesome to bring in the magic of filament/forms special DI $get when creating table filters. The use case would be to allow callbacks inside of $filter->options() to access other dep...