gregnb / gregnb/mui-datatables
Can't customize style
- Dominant language
- JavaScript
- Stars
- 2.7k
- Forks
- 906
- PR merge metrics
- No merged PRs in 30d
Description
## Expected Behavior
I'm trying to customize my table by [this docs](https://github.com/gregnb/mui-datatables#customize-styling) but it's no effect
I'm also doing research but can find examples of how to do custom style with older version material UI (v4) but I'm using v5
Is it work for material 5+?
## Current Behavior
I use material v5 so I did their Theme import :
`
import { ThemeProvider } from "@mui/styles";
import { createTheme } from "@mui/material/styles";
`
and do my styling
```
const getMuiTheme = () => createTheme({
overrides: {
MUIDataTableBodyCell: {
root: {
backgroundColor: "#FF0000",
},
},
MUIDataTablePagination: {
root: {
backgroundColor: "#000",
color: "#fff",
},
},
MUIDataTableBodyCell: {
root: {
backgroundColor: "#000000"
}
}
},
});
```
My table style didn't change with no any errors
## Steps to Reproduce (for bugs)
Please look at my codesandbox
https://codesandbox.io/s/mui-datatables-custom-style-o7v2s?file=/src/App.js
1.
2.
3.
4.
## Your Environment
| Tech | Version |
|--------------|---------|
| Material-UI | 5.2 |
| MUI-datatables | 4.0.0 |
| React | 17.2 |
| browser | Chrome latest |
| etc | |
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the linked customization-styling documentation and the provided CodeSandbox, then compare the example with the reported Material-UI 5.2 and MUI-datatables 4.0.0 setup. Done means determining whether the styling can work with these versions and documenting or demonstrating the working result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100