ui5-webcomponents icon indicating copy to clipboard operation
ui5-webcomponents copied to clipboard

Add 'onClick' property to MenuItem component

Open ej612 opened this issue 3 years ago • 4 comments

Feature Request Description

When clicking on a MenuItem inside a Menu, the event handler that is called is onItemClick on the Menu. This hinders code break down, i.e. moving certain sections or sub menus into their own files, as the event will arrive on the Menu component and will need to be forwarded to the respective sub component.

Proposed Solution

Would it be possible for the event to arrive on the clicked-on MenuItem itself, e.g. in the form of an "onClick" property on MenuItem? That way the event would arrive where we need to handle it, instead of on the top-level component which might be far removed from the affected code.

Priority

  • [x] Low
  • [ ] Medium
  • [ ] High
  • [ ] Very High

Stakeholder Info

  • Organization: SAP
  • Business impact: Confidential (please contact me for more info)

ej612 avatar Aug 01 '22 15:08 ej612

Dear Colleagues,

This is feature request for a click event to the MenuItem.

Regards, Martin

MapTo0 avatar Aug 03 '22 13:08 MapTo0

Is there any update to this feature update?

Asomoye avatar Oct 02 '23 08:10 Asomoye

@petyabegovska 1.5 years have passed, is there a chance for this to be put on the roadmap?

ej612 avatar Mar 15 '24 13:03 ej612

We would prefer the event directly on the menu-item itself as well. It seems cumbersome to get the event via the menu and need to check there which item was pressed.

pixel-fabian avatar Apr 25 '24 06:04 pixel-fabian