-
-
Notifications
You must be signed in to change notification settings - Fork 125
Description
I want to have a menu with a list of options to choose from, and for hovering over each of those options to bring up some extra details about the option in question. I want the user to be able to select an option either by selecting the option itself in the top menu or by clicking the details popup.
So I have a Menu with a Submenu for each option, and each Submenu contains a single Item that displays the details about the option. For each pair of Submenu and Item, they both use the same exact onClick prop to handle the selection, but the one in the Submenu gets ignored. I've tried using e.preventDefault and e.stopPropagation to get around whatever's blocking the Submenu from executing my code, but nothing seems to work.
Is there a way I can achieve this? I'm sure I can get the same effect through some completely different approach (toggling visibility of details with onMouseOver for an Item or something), but this felt like an elegant way to do it and I'm surprised that it doesn't seem to be working.