@@ -24,8 +24,6 @@ import Button from '@mui/material/Button';
24
24
import { extensionEnabled } from '../../utils/ReportUtils' ;
25
25
import { getCheckboxes , hasCheckboxes , updateCheckBoxes } from './TableActionsHelper' ;
26
26
27
- const TABLE_HEADER_HEIGHT = 32 ;
28
- const TABLE_FOOTER_HEIGHT = 62 ;
29
27
const TABLE_ROW_HEIGHT = 52 ;
30
28
const HIDDEN_COLUMN_PREFIX = '__' ;
31
29
const theme = createTheme ( {
@@ -209,10 +207,13 @@ export const NeoTableChart = (props: ChartProps) => {
209
207
} ) ;
210
208
211
209
const pageNames = getPageNumbersAndNamesList ( ) ;
210
+ const customStyles = { '&.MuiDataGrid-root .MuiDataGrid-footerContainer > div' : { marginTop : '0px' } } ;
211
+
212
212
const commonGridProps = {
213
213
key : 'tableKey' ,
214
214
columnHeaderHeight : 32 ,
215
- density : compact ? 'compact' : 'standard' ,
215
+ rowHeight : tableRowHeight ,
216
+ autoPageSize : true ,
216
217
rows : rows ,
217
218
columns : columns ,
218
219
columnVisibilityModel : columnVisibilityModel ,
@@ -230,7 +231,6 @@ export const NeoTableChart = (props: ChartProps) => {
230
231
checkboxSelection : hasCheckboxes ( actionsRules ) ,
231
232
rowSelectionModel : getCheckboxes ( actionsRules , rows , props . getGlobalParameter ) ,
232
233
onRowSelectionModelChange : ( selection ) => updateCheckBoxes ( actionsRules , rows , selection , props . setGlobalParameter ) ,
233
- autoPageSize : true ,
234
234
disableRowSelectionOnClick : true ,
235
235
components : {
236
236
ColumnSortedDescendingIcon : ( ) => < > </ > ,
@@ -301,15 +301,12 @@ export const NeoTableChart = (props: ChartProps) => {
301
301
{ ...commonGridProps }
302
302
getRowHeight = { ( ) => 'auto' }
303
303
sx = { {
304
- '&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell' : { py : '3px' } ,
305
- '&.MuiDataGrid-root--densityCompact .MuiDataGrid-cell:has(button)' : { py : '0px' } ,
306
- '&.MuiDataGrid-root--densityStandard .MuiDataGrid-cell' : { py : '15px' } ,
307
- '&.MuiDataGrid-root--densityComfortable .MuiDataGrid-cell' : { py : '22px' } ,
304
+ ...customStyles ,
308
305
'&.MuiDataGrid-root .MuiDataGrid-cell' : { wordBreak : 'break-word' } ,
309
306
} }
310
307
/>
311
308
) : (
312
- < DataGrid { ...commonGridProps } rowHeight = { tableRowHeight } />
309
+ < DataGrid { ...commonGridProps } sx = { customStyles } />
313
310
) }
314
311
</ div >
315
312
</ ThemeProvider >
0 commit comments