Add onClick/onPress to MenuItem #5459
-
Hi, I am using React Aria's Menu component to build a popover style menu in my design system. When using it in an application, we need to be able to trigger Javascript when certain menu items are clicked. I notice that there is an Any help would be much appreciated, Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 9 replies
-
Please see discussion here #5058 (reply in thread) |
Beta Was this translation helpful? Give feedback.
-
I'm wondering if there's any updates here? The specific use case I'm looking at is adding event tracking to a |
Beta Was this translation helpful? Give feedback.
-
Update: this was added in React Aria Components v1.11.0. MenuItem now supports press events (e.g. onPress), as well as other DOM events like onClick etc. |
Beta Was this translation helpful? Give feedback.
Update: this was added in React Aria Components v1.11.0. MenuItem now supports press events (e.g. onPress), as well as other DOM events like onClick etc.