context-menu: Change content based on target #3650
Unanswered
adriano-tirloni
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.
-
Hi everyone! I'm having a really hard time figuring out how to do this properly.
My app is heavy on the use of right click context menu (think adobe stuff), só when the user right clicks, say a wrapper div, content X shoul show.
But inside the wrapper there are 3 more components, each with additional options for the context-menu.
Also there are children i.e. textarea and other inputs, that should show system context-menu (or my clone of it if this is not feasible).
So, I'm trying to access the event.target from the onContextMenu event inside the menu content. But radix doesn't seem to link those in anyway. So when rendering the menu I have no idea what was clicked on dynamically, only if I hardcode 3 or 4 contextmenu trees.
Does that make sense?
Anyone can point me in the right direction?
Beta Was this translation helpful? Give feedback.
All reactions