Skip to content
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

[Dialog] Don't call onNestedDialogOpen when unmounting a closed nested dialog #1280

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Jan 3, 2025

Fixes #1279

@mj12albert mj12albert added bug 🐛 Something doesn't work component: dialog This is the name of the generic UI component, not the React module! labels Jan 3, 2025
@mui-bot
Copy link

mui-bot commented Jan 3, 2025

Netlify deploy preview

https://deploy-preview-1280--base-ui.netlify.app/

Generated by 🚫 dangerJS against f3d33cd

@mj12albert
Copy link
Member Author

After the fix: https://codesandbox.io/p/sandbox/inspiring-meitner-fldgw8?file=%2Fsrc%2FApp.tsx

The count seems to be correct now when unmounting/removing a nested dialog whether it was open or closed when removed

Just need to add some tests now

@mj12albert mj12albert force-pushed the fix/nested-dialog-count branch from 3660b2e to f97a877 Compare January 3, 2025 10:51
@mj12albert mj12albert force-pushed the fix/nested-dialog-count branch from f97a877 to f3d33cd Compare January 6, 2025 07:22
@mj12albert mj12albert marked this pull request as ready for review January 6, 2025 07:22
@mj12albert mj12albert merged commit a2da3d1 into mui:master Jan 6, 2025
23 checks passed
@mj12albert mj12albert deleted the fix/nested-dialog-count branch January 6, 2025 10:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: dialog This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dialog] Removing a closed nested dialog from the tree increments parent's nested open dialog count
3 participants