gregnb / gregnb/mui-datatables

stacked style - does not override

Open
#1,229 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2.7k
Forks
906
PR merge metrics
No merged PRs in 30d

Description

Attempting to override style as below does not work on mobile. The override styling rule does not gain priority over default one as one can see on the dev tool screen shot below.

The override does appear on desktop, where it is not intended to.

const getMuiTheme = () => createMuiTheme({
overrides: {
MUIDataTableHeadCell: {
root: {
// my overides here, which work fine
},
},
,
MUIDataTableBodyCell: {
root: {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis',
},
cellStackedSmall: { // **THIS WORKS**
height: '48px',
},
responsiveStackedSmall: { // **THIS WORKS**
height: '48px',
},
},
MUIDataTableBodyRow: { // ** THE ISSUE IS WITH THIS RULE **
responsiveStacked: {
border: 'solid 3px #2d5074',
},
},
},
});

Override on mobile:
![Screenshot 2020-03-19 at 08 28 50](https://user-images.githubusercontent.com/9449665/77042313-c6015b80-69bb-11ea-924a-3a763b0d706a.png)

Override showing on desktop:

![Screenshot 2020-03-19 at 08 41 40](https://user-images.githubusercontent.com/9449665/77043308-8dfb1800-69bd-11ea-99d0-83019b75e875.png)

## Expected Behavior

As per the docs, this should override default styles.

## Current Behavior

## Steps to Reproduce (for bugs)

## Your Environment

| Tech | Version |
|--------------|---------|
| Material-UI | "@material-ui/core": "^4.7.0", |
| MUI-datatables | "mui-datatables": "^2.13.0", |
| React | "react": "^16.12.0", |
| browser | Firefox Developer Edition 75.0b5 |
| etc | |

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.