Opening a Dialog from a MenuItem #2161
Unanswered
nielsrowinbik
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.
-
What I'm trying to achieve seems so trivial yet for some reason I cannot get it to work properly. I'm almost certain I'm missing something extremely obvious but I cannot for the life if me figure out what it is.
Essentially I am building an action menu much like the example in the documentation. It's a collection of actions the user can take that are contextual to an item in a list. Each item in the list has its own menu.
One of the possible actions is a delete action. This action previously existed as its own button, but since I'm adding more actions, I'd like to use a menu. Something like this:
The
DeleteButton
components renders out the button, as well as aDialog
, asking the user whether he is sure. If he is, then the item is deleted, and if not, the Dialog is simply closed:When I click on the
Delete
button, it'll show the Dialog correctly, but when I click anywhere on the Dialog, the Menu probably registers that as a click outside the Menu, and closes both the menu as well as the Dialog.I don't mind the menu closing in the background because it's deciding that clicking on the Dialog means clicking outside the menu, but I would really like the Dialog to stay open...
Since this is pretty much the outlined use cases for both the Menu and the Dialog components but used together instead of separately I'm sure there has to be a way... Any input is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions