Skip to content

Commit 43fd024

Browse files
replace obsolete gridheader option (#378)
1 parent 951c82f commit 43fd024

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# Changelog
2+
## [31.1.5] - 2025-09-05
3+
- ReportDataGrid - replace obsolete header option
24
## [31.1.4] - 2025-08-26
35
- Fix ReportDataGrids valueFormatter, inline with mui datagrid changes
46
## [31.1.3] - 2025-07-25

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linn-it/linn-form-components-library",
3-
"version": "31.1.4",
3+
"version": "31.1.5",
44
"private": false,
55
"main": "dist/index.cjs.js",
66
"module": "dist/index.esm.js",

src/components/ReportDataGrid.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { DataGrid, gridClasses, GridToolbar } from '@mui/x-data-grid';
2+
import { DataGrid, gridClasses } from '@mui/x-data-grid';
33
import Grid from '@mui/material/Grid';
44
import Tooltip from '@mui/material/Tooltip';
55
import Typography from '@mui/material/Typography';
@@ -108,9 +108,6 @@ function ReportDataGrid({
108108
columnHeaders: () => null
109109
};
110110
}
111-
if (showExport) {
112-
slots = { ...slots, toolbar: GridToolbar };
113-
}
114111

115112
// Add totals row if required
116113
if (showTotals) {
@@ -172,6 +169,7 @@ function ReportDataGrid({
172169
rows={rows}
173170
columns={columns}
174171
slots={slots}
172+
showToolbar={showExport}
175173
autoHeight={!fullPages}
176174
density="compact"
177175
getRowHeight={() => (fixedRowHeight ? 30 : 'auto')}

0 commit comments

Comments
 (0)