Component Menu, trigger event handler on MenuItem when MenuItem is activated #2477
-
With the current behavior, when user press Is there any way for me to trigger event on Menu.Item itself? At the moment, passing |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I suppose you can use the function onSelect(details){
const item = document.querySelector(`[data-value=${details.value}]`)
item.click() // or item.dispatchEvent(new CustomEvent('itemselect', { details }))
} |
Beta Was this translation helpful? Give feedback.
I suppose you can use the
onSelect
callback to trigger and event on the item yourself.