Should I use OverlayProvider only once? #2637
Replies: 3 comments
-
I'm also curious about this -- I have some flows that require a nested modal to open and I'm trying to figure out what the structure of OverlayProviders and OverlayContainers is supposed to be |
Beta Was this translation helpful? Give feedback.
-
At the root of your application, you should have an I created the following example where it has one |
Beta Was this translation helpful? Give feedback.
-
Thanks for the above. I kept working and realised that the key for nested modals to work as expected is for your the component that's calling |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The docs in useDialog says Application must be wrapped in an OverlayProvider so that it can be
hidden from screen readers when a modal opens.
From the source code of Provider and Dialog in spectrum. I found that using ModalProvider, OverlayProvider wraps the ModalProvider as the same as Provider in spectrum does , for each Dialog. Should I follow the way in spectrum or I just need to import it once?
I alse see that OverlayContainer already wraps the OverlayProvider .
Beta Was this translation helpful? Give feedback.
All reactions