Material-table: MuiThemeProvider is not working when material version is updated to 4.0.2

Created on 4 Jun 2019  路  14Comments  路  Source: mbrn/material-table

I am using MuiPaper Paper and MuiIconButton as mention below It was working fine but as we move to material 4.0.2. the theme change is not working.
const theme = createMuiTheme({
overrides: {
MuiPaper: {
root: { backgroundColor: 'blue' },
elevation2: {
boxShadow: 'none',
},
rounded: {
borderRadius: 0,
},
},
MuiIconButton: {
root: {
borderRadius: 0,
},
},
},
});


bug wontfix

Most helpful comment

Am also noticing this. Using @material-ui/core version 4.0.2 and material-table version 1.39.0. Whenever a MaterialTable is present on the page, the styling specified in createMuiTheme isn't applied to my components. When I remove the MaterialTable, the styling returns

I have the same problem, please fix (

All 14 comments

Am also noticing this. Using @material-ui/core version 4.0.2 and material-table version 1.39.0. Whenever a MaterialTable is present on the page, the styling specified in createMuiTheme isn't applied to my components. When I remove the MaterialTable, the styling returns

Am also noticing this. Using @material-ui/core version 4.0.2 and material-table version 1.39.0. Whenever a MaterialTable is present on the page, the styling specified in createMuiTheme isn't applied to my components. When I remove the MaterialTable, the styling returns

I have the same problem, please fix (

It seems there is a problem with styles of mui and MT. I will take a look asap.

I'm unfortunately facing the same problem. While using the MUI ThemeProvider the Material Table seems to apply its own styles to the html head and overrides for instance my custom typography settings, which causes a visual mess on the page. Would be glad if this issue can have some prio, because it makes Material Table unusable for now, which is very sad.

Horrible bug. All styles overriden/replaced/gone after using MT. Blocker issue. After removing MT from page, everything works fine. Wasted few hours with this.
Please fix ASAP, we appreciate in advance!
Using material-ui^4.0.2

Horrible bug. All styles overriden/replaced/gone after using MT. Blocker issue. After removing MT from page, everything works fine. Wasted few hours with this.
Please fix ASAP, we appreciate in advance!
Using material-ui^4.0.2

EDIT:
Works find with MT v1.38.0.
Wish someone fix in new version.

I will :)

ya3ani hurry up kardes

This bug is occupied since version v1.38.0. I have downgraded to version v1.37.0 and styles are back. This is a very insidious bug, I spent an hour searching what happened to my styles.

INFO:
quick fix = "material-table": "1.37.0"

Hello,
I don't know if it can help, the console is showing this warning when MaterialTable is imported :

It looks like there are several instances of @material-ui/styles initialized in this application.
This may cause theme propagation issues, broken class names and makes your application bigger without a good reason.

For me this issue doesn't exist with the v1.36.0 of material-table. Here some of my dependencies :

"@material-ui/core": "latest",
"@material-ui/icons": "latest",
"@material-ui/styles": "^4.0.1",
"material-table": "1.36.0",

Have a good day and thank you :)

Downgrading from 1.40 to 1.37 worked for us as well.

just thought i'd say that v1.37 works for me (with @material-ui/core 4.3.0). however i also see inside my console warning:

It looks like there are several instances of `@material-ui/styles` initialized in this application.
This may cause theme propagation issues, broken class names, specificity issues, and makes your application bigger without a good reason.

See https://material-ui.com/r/styles-instance-warning for more info.

leaving for searchability

Is this still an issue?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

revskill10 picture revskill10  路  3Comments

jlgreene2 picture jlgreene2  路  3Comments

ModPhoenix picture ModPhoenix  路  3Comments

KKrisu picture KKrisu  路  3Comments

behrouz-s picture behrouz-s  路  3Comments