-
Notifications
You must be signed in to change notification settings - Fork 158
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(filter-panel): prevent accordion state resetting on input selection #7452
fix(filter-panel): prevent accordion state resetting on input selection #7452
Conversation
2919fd8
to
dc2d775
Compare
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Deploy preview created for package Built with commit: 5cf4b51d78da9c99c87c1e3bb8d1ae0339877d5a |
Related Ticket(s)
#6677
Description
This PR resolves an issue with the filter panel where panel groups would unexpectedly collapse on selection of filter items. It also addresses the issue of inconsistent filter panel headings, so it now reflects the number of selections in the standalone filter panel (matching the filter panel modal)
Screen.Recording.2021-10-20.at.8.34.03.AM.mov
It looks like the light DOM controls the filter panel modal and the shadow DOM controls the standalone filter panel. I'm a bit iffy on changing light DOM attributes after iterating through the shadow DOM but I think this approach is required given the current construction of the component (need some more feedback on that)
While looking into this, I noticed that the storybook knobs would not update the filter panel heading as expected (#7441), so it seems that the props and internal state need to be reconciled for this to be resolved. Resolving this should also improve support for translated strings, as the "Filter" heading is currently hard coded. The component may be due for a refactor but that can probably be done separately from the work for #6677
Changelog
Changed
Removed