Skip to content

Commit 1885e9f

Browse files
committed
fix: hide column in print mode when print: false
1 parent b8d2eee commit 1885e9f

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 !important',
33+
},
34+
},
35+
},
3036
paper: {},
3137
paperResponsiveScrollFullHeightFullWidth: {
3238
position: 'absolute',
@@ -79,13 +85,6 @@ const defaultTableStyles = theme => ({
7985
position: 'absolute',
8086
width: '1px',
8187
},
82-
'@global': {
83-
'@media print': {
84-
'.datatables-noprint': {
85-
display: 'none',
86-
},
87-
},
88-
},
8988
});
9089

9190
const TABLE_LOAD = {

0 commit comments

Comments
 (0)