Replies: 1 comment
-
I have got this working in a kind of hacky way by triggering an escape key press when - or + is pressed but it doesn't feel like the best way to achieve this so I'm hoping someone can point me in the right direction.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In my app, a user can zoom in/out with the + and - keys. This scales the whole UI.
I have a bug where, if the user presses +/- while the context menu is open, the position of the menu gets out of sync with what was right clicked so I would like to close the Context Menu when a user presses those keys but I can't see a way of implementing the Context Menu with a controlled state.
Is there an event or method I can call to close the menu? A prop I can pass to allow me to control the isOpen state?
Beta Was this translation helpful? Give feedback.
All reactions