Add 'onClick' property to MenuItem component
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)
Dear Colleagues,
This is feature request for a click event to the MenuItem.
Regards, Martin
Is there any update to this feature update?
@petyabegovska 1.5 years have passed, is there a chance for this to be put on the roadmap?
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.