How to select Radix UI Menubar menu only when being clicked and not on hover? #2687
Unanswered
PawanKr3012
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am working with Radix UI
menubar
. By default the nature of themenubar
is that when we click on any menu then we are able to see content of that menu appear but then when we hover on any other menu even without clicking on the menu the menu being hovered gets selected.I only want the menu to be selected when it is clicked. In order to do so I created a
value
state variable and tried to the assign the value to menubar rootvalue
prop. Now I want to change the state accordingly on the click of the menu, but it is not working.Here is the code:
Please guide me
Beta Was this translation helpful? Give feedback.
All reactions