-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(filter-panel): add view all button for filter groups (#8258)
### Related Ticket(s) Resolves #7405 ### Description Adds support for "view all" buttons in `DDSFilterGroupItem` components. - The button text defaults to "View all" and can be changed with the `view-all-text` attribute. - The button appears when the number of filters in the group exceeds the `max-filters` attribute value. This defaults to 7, as per the functional specs. - When the button appears, the number of filters specified by the `filter-cutoff` attribute are shown at first (defaults to 5 as per functional specs). The hidden filters are revealed once the button has been clicked. - The shown/hidden filters are reset once the filter group is toggled closed and then re-opened. - There is one exception to this: if one of the filters that would be hidden has been selected, all filter items are revealed when re-opening the filter group. ### Changelog **New** - "View all" buttons render in `DDSFilterGroupItem` components when a sufficient number of filters are present in the group. **Changed** - Split the `DDSFilterPanelComposite`'s modal and desktop rendering into two methods to make it more obvious what's going on. <!-- React and Web Component deploy previews are enabled by default. --> <!-- To enable additional available deploy previews, apply the following --> <!-- labels for the corresponding package: --> <!-- *** "package: services": Services --> <!-- *** "package: utilities": Utilities --> <!-- *** "RTL": React / Web Components (RTL) --> <!-- *** "feature flag": React / Web Components (experimental) -->
- Loading branch information
Showing
6 changed files
with
515 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.