New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting default portal container #19552
Comments
👋 Thanks for using Material-UI! We use GitHub issues exclusively as a bug and feature requests tracker, however, For support, please check out https://material-ui.com/getting-started/support/. Thanks! If you have a question on StackOverflow, you are welcome to link to it here, it might help others. |
(It's possible) |
I'm reposting this as a bug as I find there's no global portal setting for its container. |
Right, this seems accurate. We could introduce a The workaround is to set the prop it at the parent level. |
@sandorvasas I'm confused by this part. What's your use case for not using document.body as a DOM container of the portals? |
Ok, it seems to answer my previous question. So you don't need to change the container. |
@olegberman Isn't this a bug? Considering theres no way to pass props to BTW, a lot of use cases of containers are related to shadow-dom |
See #17473 for the support of shadow dom. It's not something we are supporting natively. |
Setting default props for the |
Hi,
How is it possible to set the default portal container for MUI? I need to use the global portal, but I also need the elements to appear inside my root div, so they are still inside various
<XXProvider>
components. We have a large app and it'd be tedious to refactor each component to use its own<Portal>
.The text was updated successfully, but these errors were encountered: