question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Including material-table overrides material-ui theme

See original GitHub issue

Describe the bug

material-table loads default material-ui styles again overriding theme styles.

To Reproduce

Steps to reproduce the behavior:

  1. Create MUI theme and change theme.typography.fontFamily
  2. Load theme using MuiThemeProvider
  3. Create React page and ensure theme is applied
  4. Create React page with MaterialTable
  5. Look at developer tools to find typography styles have been overriden.

Expected behavior

Should not have duplicated material-ui style elements after including MaterialTable

Screenshots

Screen Shot 2019-05-28 at 6 24 41 PM Screen Shot 2019-05-28 at 6 25 37 PM

Environment

npx create-react-app my-app --typescript
"@material-ui/core": "^4.0.0",
"material-table": "^1.37.0",

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
wofflelofflecommented, Jun 27, 2019

I can confirm this happens with .MuiButtonBase-root too.

Is there a way to make your styles more specific at all?

2reactions
bishoymcommented, Aug 26, 2020

Issue is persistent on 1.69

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theming - Material UI - MUI
Customize MUI with your theme. You can change the colors, the typography and much more. The theme specifies the color of the components,...
Read more >
Applying specific theme for react material-table - Stack Overflow
You can overrides components. Look at example: https://mbrn.github.io/material-table/#/docz-examples-10-example-component-overriding.
Read more >
13. Apply Dark mode to Material Table | Material UI - YouTube
In this video we go over:- How to make your app dark mode or theme with Material table and React- How to create...
Read more >
14. Overriding Toolbar component in Material Table | Material UI
In this video we go over:- How to override toolbar component in Material table and React- How to customize action buttons and make...
Read more >
material-table
Actions. You can add one or multiple row based actions easily ; Component Overriding. You can override any component of material-table ; Custom...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found