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

[Modal] Make the initial "exited" state to dependent on "open" #35010

Merged
merged 5 commits into from Dec 6, 2022

Conversation

sai6855
Copy link
Contributor

@sai6855 sai6855 commented Nov 5, 2022

Fixes: #34999

exited state was defaulted to true in ModalUnstyled.tsx, but if initial state of open is true and exited is true then closing animation is not being applied. So I've made initial state of exited to be dependent on open .

After fix: https://codesandbox.io/s/eager-river-0yloeh?file=/src/App.js

@sai6855 sai6855 closed this Nov 5, 2022
@sai6855 sai6855 reopened this Nov 5, 2022
@mui-bot
Copy link

mui-bot commented Nov 5, 2022

Messages
📖 Netlify deploy preview: https://deploy-preview-35010--material-ui.netlify.app/

Details of bundle changes

Generated by 🚫 dangerJS against b3b953a

@sai6855 sai6855 changed the title made "exited" initial state to dependent on "open" [Swipable Drawer] made "exited" initial state to dependent on "open" Nov 5, 2022
@zannager zannager added the component: SwipeableDrawer The React component. label Nov 7, 2022
@sai6855
Copy link
Contributor Author

sai6855 commented Nov 11, 2022

Hey @mnajdova any reason this pr is not being reviewed, I'm happy to implement whatever changes are required

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. Changes look great, I could validate that it works here: https://codesandbox.io/s/wonderful-lumiere-sqf133?file=/package.json

Can we please add a test before merging? We could create an open modal with a custom slots.root component and validate that the exited prop has the correct value.

@mnajdova mnajdova changed the title [Swipable Drawer] made "exited" initial state to dependent on "open" [Modal] Make the initial "exited" state to dependent on "open" Nov 11, 2022
@sai6855

This comment was marked as outdated.

@sai6855
Copy link
Contributor Author

sai6855 commented Nov 17, 2022

Hey @mnajdova I've added test as described, this is pr ready for review

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work component: drawer This is the name of the generic UI component, not the React module! labels Nov 19, 2022
@santhosh-reddy03
Copy link

Hi Team,

Can we please merge this change, looks like its passing all test cases and good to go, I was facing the same issue and this PR came close to my issue, thanks @sai6855 for fixing the bug.

@xavier-villelegier
Copy link

Hey @mnajdova, would it be possible to have a second quick look at this one please ? 🙏

@sai6855
Copy link
Contributor Author

sai6855 commented Dec 5, 2022

@ZeeshanTamboli can you review this pr

Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sai6855 Looks good! Thanks for the fix!

@ZeeshanTamboli ZeeshanTamboli removed the component: drawer This is the name of the generic UI component, not the React module! label Dec 6, 2022
@ZeeshanTamboli ZeeshanTamboli merged commit cd27859 into mui:master Dec 6, 2022
@ZeeshanTamboli ZeeshanTamboli mentioned this pull request Dec 6, 2022
feliperli pushed a commit to jesrodri/material-ui that referenced this pull request Dec 6, 2022
…ue (mui#35010)

Co-authored-by: ZeeshanTamboli <zeeshan.tamboli@gmail.com>
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: SwipeableDrawer The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[SwipeableDrawer] Missing close animation when initial open is true
7 participants