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] context is lost inside Dialog childs #2494

Closed
andrejunges opened this issue Dec 12, 2015 · 5 comments
Closed

[Dialog] context is lost inside Dialog childs #2494

andrejunges opened this issue Dec 12, 2015 · 5 comments
Labels
bug 🐛 Something doesn't work external dependency Blocked by external dependency, we can’t do anything about it

Comments

@andrejunges
Copy link
Contributor

material ui - 0.14.0-rc1
react-intl - 2.0.0-pr-3

I'm using react-intl and material-ui in my App and I'm having problems in all Dialog's childs where the intl property provided by injectIntl from react-intl is 'lost' (different from the app language once it changes). When I change the language all the components from the app update it's labels, only the dialogs childs dont.
I'm not saying its a problem from the Dialog itself, and Im almost sure it worked in older versions.

Is someone having this same issue? do you have any suggestion?
Thanks

@oliviertassinari
Copy link
Member

I'm not saying its a problem from the Dialog itself, and Im almost sure it worked in older versions.

I have noticed the same issue. This issue was introduced by the usage of unstable_renderSubtreeIntoContainer https://github.com/callemall/material-ui/blob/master/src/render-to-layer.jsx#L131.
I have huge suspicion that it's an issue with react itself.
The update feature is not in their tests cases, so, it might not work.

@andrejunges
Copy link
Contributor Author

was it implemented using unstable_renderSubtreeIntoContainer in these last releases? I haven't updated react for some weeks.. and I just noticed it yesterday
may be useful: https://twitter.com/dan_abramov/status/613329336809168897

@oliviertassinari
Copy link
Member

was it implemented using unstable_renderSubtreeIntoContainer in these last releases?

No, It wasn't. Let met test that react is correctly handling this update case.

@alitaheri alitaheri added bug 🐛 Something doesn't work external dependency Blocked by external dependency, we can’t do anything about it labels Dec 14, 2015
@CremaFR
Copy link

CremaFR commented Jul 11, 2016

Any news on this one?

I have the same problem using FormattedMessage from react-intl as a node child for my errorText in a TextField and the locale remains to default language

@oliviertassinari
Copy link
Member

oliviertassinari commented Jul 11, 2016

@cremalex It was fixed with facebook/react#7125 and released as React v15.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work external dependency Blocked by external dependency, we can’t do anything about it
Projects
None yet
Development

No branches or pull requests

4 participants