Nested Dialog trigger #2282
-
Hello 👋 I'm trying to implement a <Dialog.Trigger> inside another <Dialog.Trigger> and would need some help to find a solution. I recreated a Codesandbox to illustrate the issue: https://codesandbox.io/s/elastic-danny-jwst9l?file=/src/App.tsx This is pretty inconvenient because this can happen a lot in my app and I believe in others too. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's because the event is bubble up to the outer |
Beta Was this translation helpful? Give feedback.
It's because the event is bubble up to the outer
Dialog.Trigger
. AddingonClick={event => event.StopPropagation()}
in the nestedDialog.Trigger
andDialog.Content
should work