Skip to content
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

Fix multi select filters in filter panel #876

Merged
merged 4 commits into from
Aug 1, 2018
Merged

Fix multi select filters in filter panel #876

merged 4 commits into from
Aug 1, 2018

Conversation

lyyder
Copy link
Contributor

@lyyder lyyder commented Aug 1, 2018

Fixes a bug in search filters that was caused by the multi select filter input IDs not being unique. This resulted in multiple filter input elements with same IDs if search filters panel is in use as it uses the same filter components as the mobile filter view. The result of this was that when selecting an option in a multi select filter in the search filters panel a mobile search filter callback was fired as the panel and the mobile view share the same filter components.

NOTICE!

When merging this PR to a downstream project, remember to pass the id prop to all the SelectMultipleFilter and SelectMultipleFilterPlain components in SearchFilters, SearchFiltersMobile, SearchFiltersPanel and other places where you have used them.

@lyyder lyyder changed the title Fix filter panel Fix multi select filters in filter panel Aug 1, 2018
@lyyder lyyder requested a review from Gnito August 1, 2018 11:57
Copy link
Contributor

@Gnito Gnito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some a note to Changelog and the description of this PR about what components need to be called with id after upstream is merged.

Check that filter props are available before resolving initial values
for the corresponding filter param.
Pass in the id of the parent component of the filter to achieve input ID
uniqueness.
@lyyder lyyder merged commit 378e3d0 into master Aug 1, 2018
@lyyder lyyder deleted the fix-filter-panel branch August 1, 2018 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants