Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Use separate chip groups for tag categories (#1903)
Use one ToolbarFilter per options group. First filter provides the option list. Remaining filters are hidden and used only for side effects (separate chip groups). The approach follows similar widgets used by Forklift plugin and OpenShift Console but uses a flat list of toolbars (nesting trick requires the widget to be visible all the time). Related refactorings in MuliselectFilterControl: 1. drop unused feature - using dictionary type for selectedOptions 2. drop state that can be calculated: a) active item from focusedItemIndex b) selectedOptions from filters 3. centralize id calculations - use prefix based on category title 4. use label styling for tag category part of option Resolves: #1774 Reference-Url: kubev2v/forklift-console-plugin#90 Reference-Url: https://github.com/openshift/console/blob/5ba18580676a25e4304df78253aad6a9832d4d56/frontend/public/components/filter-toolbar.tsx#L299 --------- Signed-off-by: Radoslaw Szwajkowski <[email protected]>
- Loading branch information