[Dialog][DropdownMenu] Add Dialog/DropdownMenu composition examples #820
Replies: 4 comments
-
Posting as a reminder, two good options for composition depending on requirements: Composing dialog outside of content: Composing dialog inside content (preventing close and visually hiding): |
Beta Was this translation helpful? Give feedback.
-
@benoitgrelard @andy-hook I am having a hard time making it work using the radix 1.0.0 Dialog + Dropdown, and I also want to ask: Is the Example using Radix customized: https://deploy-preview-100--vip-design-system-components.netlify.app/?path=/story/dropdown--with-dialog-state The problem is:
|
Beta Was this translation helpful? Give feedback.
-
@benoitgrelard I was able to create an example with everything I have on my local machine, working: https://codesandbox.io/s/pensive-frost-p03qy7?file=/App.js
But for some reason, when I use all these in my local library, the focus doesn't go to the dialog once the trigger happens. Do you have any possible idea why the focus doesn't go to the Dialog when it opens? In this example above, it's working correctly, but using all of it together outside of the code sandbox, it doesn't. Do you believe it has to do with Portals? |
Beta Was this translation helpful? Give feedback.
-
I don't think it would have anything to do with portals no. |
Beta Was this translation helpful? Give feedback.
-
See radix-ui/primitives#634
Beta Was this translation helpful? Give feedback.
All reactions