Skip to content

Commit c7a4020

Browse files
authored
Merge pull request #1914 from aaneitchik/fix/global-print-styles
fix: hide column in print mode when `print: false`
2 parents 3a676a6 + 2ce6c87 commit c7a4020

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/MUIDataTable.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ import { HTML5Backend } from 'react-dnd-html5-backend';
2626
import { load, save } from './localStorage';
2727

2828
const defaultTableStyles = theme => ({
29-
root: {},
29+
root: {
30+
'& .datatables-noprint': {
31+
'@media print': {
32+
display: 'none',
33+
},
34+
},
35+
},
3036
paper: {
3137
isolation: 'isolate',
3238
},
@@ -81,13 +87,6 @@ const defaultTableStyles = theme => ({
8187
position: 'absolute',
8288
width: '1px',
8389
},
84-
'@global': {
85-
'@media print': {
86-
'.datatables-noprint': {
87-
display: 'none',
88-
},
89-
},
90-
},
9190
});
9291

9392
const TABLE_LOAD = {

0 commit comments

Comments
 (0)