Skip to content

Commit 42c29c0

Browse files
authored
[DataGrid] Avoid ResizeObserver loop error (#17984)
1 parent 80ab00a commit 42c29c0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/x-data-grid/src/hooks/features/rows/useGridRowsMeta.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,10 @@ export const useGridRowsMeta = (
271271
apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
272272
}
273273
if (!isHeightMetaValid.current) {
274-
apiRef.current.requestPipeProcessorsApplication('rowHeight');
274+
// Avoids "ResizeObserver loop completed with undelivered notifications" error
275+
requestAnimationFrame(() => {
276+
apiRef.current.requestPipeProcessorsApplication('rowHeight');
277+
});
275278
}
276279
}),
277280
).current;

0 commit comments

Comments
 (0)