Problem/Motivation
Once #2787255: Provide a views filter for administrative areas lands, we'll have a views filter for administrative areas that conditionally appears (with the right options) once a country has been selected. If the country is coming from another exposed filter on the same view, it'd be nice to automatically rebuild the form element for administrative areas as soon as the country selector is touched (like the address field widget), not just when the "apply" button is submitted and the whole page is reloaded.
Proposed resolution
Use #ajax to rebuild the form element.
Remaining tasks
- Fix Views upstream to support #ajax inside exposed filter forms: #2842525: Ajax attached to Views exposed filter form does not trigger callbacks
- Use the solution from #2842525 to get this working inside the AdministrativeArea views filter plugin class (hopefully reusing much of the code that's already rebuilding the filter configuration form via AJAX).
User interface changes
Enhance the exposed filter UI to automatically update the administrative area filter whenever the country filter is changed.
API changes
Hopefully none, once the dust settles upstream in Views.
Data model changes
None.
Comments
Comment #2
dwwThe upstream Views issue is now split, with #2842525: Ajax attached to Views exposed filter form does not trigger callbacks being the issue for fixing this in D8 core. Updating the related issues and issue summary accordingly.
Comment #3
hodba commentedHi, any update on this issue?
Comment #4
dww@hodba: Not until the upstream bug in core is fixed. Please follow #2842525: Ajax attached to Views exposed filter form does not trigger callbacks (and ideally, contribute to fixing it).
Thanks/sorry,
-Derek