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

Add BackdropComponent prop to resolve issue with transitionDuration prop on MUI v4 #67

Merged
merged 1 commit into from
Aug 21, 2019

Conversation

OliverJEvans
Copy link
Contributor

@OliverJEvans OliverJEvans commented Aug 21, 2019

In Material UI v3 the modal uses the Backdrop component which supports transitionDuration.
In Material UI v4 the modal uses a 'SimpleBackdrop' component with limited prop support.

This change forces the Modal to use the Backdrop component. This will make no visual or behavioural difference in MUI v3 and enables support for transitionDuration in MUI v4.

Fixes #66

@leMaik
Copy link
Member

leMaik commented Aug 21, 2019

Thank you! 👏 If it really actually works fine with both versions, I think we should update the peer dependency to reflect that and disable the warning when using this with MUI v4.

@leMaik leMaik changed the title Fix #30 Add BackdropComponent prop to resolve issue with transitionDuration prop on MUI v4 Add BackdropComponent prop to resolve issue with transitionDuration prop on MUI v4 Aug 21, 2019
@OliverJEvans
Copy link
Contributor Author

Yeah, the change made works in MUI v3 & v4, but I cannot confirm that every feature and option of your app will be supported by v4 to be honest :)

Although everything does appear to work, and removes the only error message I had in the console on a project that uses MUI v4.

@leMaik
Copy link
Member

leMaik commented Aug 21, 2019

@OliverJEvans I think that's sufficient. I'll change the peer dependency to 3.0.0 || 4.0.0 later and wait until someone finds an issue that requires to ship a new major release for v4. 🤷‍♂️

Again, thanks for this nice first contribution. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning: React does not recognize the transitionDuration prop on a DOM element.
2 participants