Commit 161af0f
authored
feat(ui5-menu): menu item groups with checkable menu items (#10028)
This PR introduces **MenuItemGroup** component that can hold regular **MenuItem** components. The **MenuItemGroup** has a property named `itemCheckMode` which can have values among `None` (default), `Single` and `Multiple`. **MenuItemGroup** can be slotted in a **Menu** or **MenuItem** default slot as any other regular **MenuItem**. Nesting of **MenuItemGroup** components is not allowed, but any **Menu** or **MenuItem** can contain more than one **MenuItemGroup** components with different `itemCheckMode` settings.
When `itemCheckMode` is:
* `None`, the **Menu** acts exactly like until now.
* `Single` means that zero or one **MenuItems** can be checked at a time.
* `Multiple` means that zero or many **MenuItems** can be checked at a time.
There is also new property `checked` introduced in **MenuItem**. By setting it the item is marked as **checked** and this is visualized as checkmark at the end of the item. This property is taken into account only when the corresponding item is a member of MenuItemGroup with `Single` or `Multiple` value of `itemCheckMode`.

It is recommended to place separators before and after each **MenuItemGroup**, but this is not mandatory and depends on the application developers.1 parent 1fdce6a commit 161af0f
File tree
17 files changed
+979
-45
lines changed- packages
- fiori/src
- main
- cypress/specs
- src
- themes
- types
- test/pages
- website/docs
- _components_pages/main/Menu
- _samples/main/Menu/ItemGroups
17 files changed
+979
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments