-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#142 Add chain select to state and counties in Search Builder #12213
Conversation
ping @colemanw @agh1 @lcdservices |
@monishdeb you say, "Make the states drop-down depend upon a country of the same location type". Does this imply that the country field is now a required field to search by state/province in Search Builder? |
@MegaphoneJon just looking at it in the demo site, it appears that you can use the State/Province on its own, but the choices are limited to the countries you've enabled for showing states--similar behavior to a profile with State/Province but not Country. I don't think this is necessarily a problem, but it is a key change that wasn't documented. |
@monishdeb @colemanw In playing around with this, I did find a somewhat serious problem: when a Country field changes, all State/Province fields with that location type change their options, even within other "Also include contacts where" groupings. To recreate, let's say you are planning an event in Detroit:
Notice that the state dropdown where Michigan had been selected now has nothing selected and offers only Canadian provinces. |
Thanks @colemanw for merging this PR. @MegaphoneJon not quite, I would say on presence of country field IF there is a state filter selected which got same location type as of country, it will reload the select list as per selected country. If there is no country present, state will simply populate the states of default country configured. And I agree I should have documented this fact in my PR description. @agh1 if you find any other issue/miss please create a separate issue and assign to me and thanks for your feedback :) |
@agh1 so as per the expected behaviour I think change on country field should only affect the block where the selection made? Like here it shouldn't affect the state field under "Also include contacts where" block but all state fields under "Include contacts where" block? |
@monishdeb exactly--the markup looks like each section is in its own div with the class |
Yup agree, would you like to create a issue on gitlab and assign it to me? |
@monishdeb no prob. I opened dev/core#150 though I can't change assignments. |
Good catch. Thanks @agh1 |
Overview
The Search Builder state and county fields don't filter with reference to the country or state fields that are within the same AND grouping. The state field displays the states from the countries that have states enabled, and the county field displays all counties in alphabetical order.
Proposal:
Before
State/Counties don't reload on changing country/state respectively in Search builder for same location type.
After
State/Counties reload on changing country/state respectively in Search builder for same location type (here as per screencast check that two location type used Home and Billing)