You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
ande.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.The text was updated successfully, but these errors were encountered: