diff --git a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsExpandedGrid.tsx b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsExpandedGrid.tsx index f98d6ae9d..32fa40e16 100644 --- a/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsExpandedGrid.tsx +++ b/src/scenes/Dashboard/ProgressReportsWidget/ProgressReportsExpandedGrid.tsx @@ -1,6 +1,7 @@ import { Box } from '@mui/material'; import { DataGridProProps as DataGridProps, + GridColDef, GridRenderCellParams, GridRowId, GridToolbarColumnsButton, @@ -26,24 +27,27 @@ import { const COLLAPSED_ROW_HEIGHT = 54; -// Position cell text consistently regardless of expansion -const NonExpansionCell = ({ formattedValue }: GridRenderCellParams) => ( - { + // Position cell text consistently regardless of expansion + const NonExpansionCell = (props: GridRenderCellParams) => ( + - {formattedValue} - -); + display: 'flex', + alignItems: 'center', + }} + > + {renderCell ? renderCell(props) : props.formattedValue ?? props.value} + + ); + return NonExpansionCell; +}; const columns = entries(ProgressReportsColumnMap).map(([name, col]) => ({ field: name, @@ -51,7 +55,9 @@ const columns = entries(ProgressReportsColumnMap).map(([name, col]) => ({ ...(!( 'cellClassName' in col && col.cellClassName.includes(ExpansionMarker) ) && { - renderCell: NonExpansionCell, + renderCell: wrapForNonExpansion( + 'renderCell' in col ? col.renderCell : undefined + ), }), }));