From c6d8bf4fa684bd005c561239462715d7bfa68a0a Mon Sep 17 00:00:00 2001 From: Andrew Cherniavskyi Date: Tue, 9 Jul 2024 21:52:01 +0200 Subject: [PATCH] fix failing test --- packages/x-data-grid/src/components/GridRow.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/x-data-grid/src/components/GridRow.tsx b/packages/x-data-grid/src/components/GridRow.tsx index 917deae2ba621..63c48940c0391 100644 --- a/packages/x-data-grid/src/components/GridRow.tsx +++ b/packages/x-data-grid/src/components/GridRow.tsx @@ -346,7 +346,7 @@ const GridRow = React.forwardRef(function GridRow( } const getCell = ( - column: GridStateColDef, + column: GridStateColDef | undefined, indexInSection: number, indexRelativeToAllColumns: number, sectionLength: number, @@ -357,6 +357,11 @@ const GridRow = React.forwardRef(function GridRow( indexRelativeToAllColumns, ); + if (!column) { + // See https://github.com/mui/mui-x/issues/13719 + return null; + } + if (cellColSpanInfo?.spannedByColSpan) { return null; }