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

Material UI compatibility #12

Open
BGligorijevic opened this issue Aug 6, 2018 · 7 comments
Open

Material UI compatibility #12

BGligorijevic opened this issue Aug 6, 2018 · 7 comments

Comments

@BGligorijevic
Copy link

Hello,

When using React Web Component I am unable to get Material UI to work with it.
No styles are recognized, and when I try using Dialog component, I get:
index.js:32 Uncaught TypeError: Cannot read property 'webComponentAttributeChanged' of undefined
at callLifeCycleHook (index.js:32)...

I guess it has something to do with Shadow DOM and CSS.
Is there any workaround for this?

@mnemanja
Copy link
Contributor

Hi @BGligorijevic,
Have a try with this from the documentation:

ReactWebComponent.create(<App />, 'my-component', true);

@smilexu
Copy link

smilexu commented Nov 15, 2018

@BGligorijevic I have the exactly same issue, have you found solution ?

@smilexu
Copy link

smilexu commented Nov 16, 2018

@mnemanja it does not work unfortunately.

@smilexu
Copy link

smilexu commented Nov 16, 2018

In latest version, ReactWebComponent.create(, 'my-component', false) works for me, to switch off shadow dom. But that is not how we target. Seems we can inject styles in shadow dom somehow, working on that.

@BGligorijevic
Copy link
Author

Hello guys,
Sorry for my late response, I gave up on this and went with native customElements registration and React bootstrap for my project, it all works without problems.
Sorry for not being able to help you, I do not have a solution for this.
Have a good day,

Boris

@smilexu
Copy link

smilexu commented Nov 18, 2018

Found a solution, see here

https://codesandbox.io/s/04j9lxymow

it can help you inject styles indo shadow dom, but need to refactor react-web-component a little bit.

@mnemanja
Copy link
Contributor

mnemanja commented Apr 8, 2020

@BGligorijevic, then you might as well close this ticket.

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

No branches or pull requests

3 participants