Skip to content

Conversation

@NHristov-sap
Copy link
Contributor

@NHristov-sap NHristov-sap commented Oct 15, 2024

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.

image

It is recommended to place separators before and after each MenuItemGroup, but this is not mandatory and depends on the application developers.

@NHristov-sap NHristov-sap requested a review from hinzzx October 18, 2024 12:17
Copy link
Contributor

@nnaydenow nnaydenow left a comment

Choose a reason for hiding this comment

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

Blocking unti: #10070

@nnaydenow nnaydenow dismissed their stale review October 22, 2024 13:52

Menu tests are fixed and this PR no longer need to be blocked

@github-actions github-actions bot added the Stale label Jun 5, 2025
@github-actions github-actions bot removed the Stale label Jun 11, 2025
@ilhan007 ilhan007 requested review from Stoev and nnaydenow June 20, 2025 08:58
@NHristov-sap NHristov-sap dismissed stale reviews from vladitasev, adrian-bobev, and nnaydenow June 23, 2025 06:17

We agreed the PR is good to go

@NHristov-sap NHristov-sap merged commit 161af0f into main Jun 23, 2025
19 of 20 checks passed
@NHristov-sap NHristov-sap deleted the BL_menu_selectable branch June 23, 2025 09:24
NHristov-sap added a commit that referenced this pull request Jun 26, 2025
…nge' event (#11793)

There were 2 events introduced in PR #10028 - private `item-check` event fired by `MenuItem` when its `checked` property changes, and public `check-change` event fired by `MenuItemGroup` when any of its `MenuItem` components changes it's `checked` property.

This PR removes these two events in favor of single public `check` event, fired by the `MenuItem` when its `checked` property changes. The new situation will be more suitable for handling `MenuItem` `checked` states and updating models in applications that use Menu Item Groups.
@ui5-webcomponents-bot
Copy link
Collaborator

🎉 This PR is included in version v2.12.0-rc.2 🎉

The release is available on v2.12.0-rc.2

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.