@@ -24,8 +24,6 @@ import Button from '@mui/material/Button';
2424import { extensionEnabled } from '../../utils/ReportUtils' ;
2525import { getCheckboxes , hasCheckboxes , updateCheckBoxes } from './TableActionsHelper' ;
2626
27- const TABLE_HEADER_HEIGHT = 32 ;
28- const TABLE_FOOTER_HEIGHT = 62 ;
2927const TABLE_ROW_HEIGHT = 52 ;
3028const HIDDEN_COLUMN_PREFIX = '__' ;
3129const theme = createTheme ( {
@@ -209,10 +207,13 @@ export const NeoTableChart = (props: ChartProps) => {
209207 } ) ;
210208
211209 const pageNames = getPageNumbersAndNamesList ( ) ;
210+ const customStyles = { '&.MuiDataGrid-root .MuiDataGrid-footerContainer > div' : { marginTop : '0px' } } ;
211+
212212 const commonGridProps = {
213213 key : 'tableKey' ,
214214 columnHeaderHeight : 32 ,
215- density : compact ? 'compact' : 'standard' ,
215+ rowHeight : tableRowHeight ,
216+ autoPageSize : true ,
216217 rows : rows ,
217218 columns : columns ,
218219 columnVisibilityModel : columnVisibilityModel ,
@@ -230,7 +231,6 @@ export const NeoTableChart = (props: ChartProps) => {
230231 checkboxSelection : hasCheckboxes ( actionsRules ) ,
231232 rowSelectionModel : getCheckboxes ( actionsRules , rows , props . getGlobalParameter ) ,
232233 onRowSelectionModelChange : ( selection ) => updateCheckBoxes ( actionsRules , rows , selection , props . setGlobalParameter ) ,
233- autoPageSize : true ,
234234 disableRowSelectionOnClick : true ,
235235 components : {
236236 ColumnSortedDescendingIcon : ( ) => < > </ > ,
@@ -301,15 +301,12 @@ export const NeoTableChart = (props: ChartProps) => {
301301 { ...commonGridProps }
302302 getRowHeight = { ( ) => 'auto' }
303303 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 ,
308305 '&.MuiDataGrid-root .MuiDataGrid-cell' : { wordBreak : 'break-word' } ,
309306 } }
310307 />
311308 ) : (
312- < DataGrid { ...commonGridProps } rowHeight = { tableRowHeight } />
309+ < DataGrid { ...commonGridProps } sx = { customStyles } />
313310 ) }
314311 </ div >
315312 </ ThemeProvider >
0 commit comments