[Dialog] v5 component renders even if open
is false (different from v4)
#35991
Labels
component: dialog
This is the name of the generic UI component, not the React module!
docs
Improvements or additions to the documentation
v5.x
Duplicates
Latest version
Steps to reproduce 🕹
Link to live example:
Steps:
MUI5 - https://codesandbox.io/s/angry-mclaren-vgmhu6?file=/demo.tsx
1.Embed a Dialog in the code
2.Set it to open={false}
3.The dialog still renders in the DOM but is closed
MUI4- https://codesandbox.io/s/material-demo-forked-qm3dub?file=/demo.js
1.Embed a Dialog in the code
2.Set it to open={false}
3.The dialog does not render in the DOM
This has not been mentioned in the changes in the MUI5 document. This is breaking a few things in my app
Current behavior 😯
1.Embed a Dialog in the code
2.Set it to open={false}
3.The dialog still renders but is closed
Expected behavior 🤔
1.Embed a Dialog in the code
2.Set it to open={false}
3.The dialog should not render
Context 🔦
ON upgrading from MUI4 to MUI5, the dialog behaviour changed causing issues
Your environment 🌎
npx @mui/envinfo
The text was updated successfully, but these errors were encountered: