@mui/x-data-grid 7.29.3 → 7.29.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,77 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.29.5
7
+
8
+ _May 29, 2025_
9
+
10
+ We'd like to extend a big thank you to @cherniavskii, who made this release possible.
11
+
12
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
13
+
14
+ ### Data Grid
15
+
16
+ #### `@mui/x-data-grid@7.29.5`
17
+
18
+ - [DataGrid] Avoid ResizeObserver loop error (@cherniavskii) (#18005) @github-actions[bot]
19
+
20
+ #### `@mui/x-data-grid-pro@7.29.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
21
+
22
+ Same changes as in `@mui/x-data-grid@7.29.5`.
23
+
24
+ #### `@mui/x-data-grid-premium@7.29.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
25
+
26
+ Same changes as in `@mui/x-data-grid-pro@7.29.5`.
27
+
28
+ ## 7.29.4
29
+
30
+ _May 22, 2025_
31
+
32
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
33
+
34
+ - 🐞 Bugfixes
35
+
36
+ Special thanks go out to the community members for their valuable contributions:
37
+ @campmarc, @whereisrmsqhs, @jyash97
38
+
39
+ Following are all team members who have contributed to this release:
40
+ @mapache-salvaje, @cherniavskii, @noraleonte.
41
+
42
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
43
+
44
+ ### Data Grid
45
+
46
+ #### `@mui/x-data-grid@7.29.4`
47
+
48
+ - [DataGrid] Fix `renderContext` calculation loop (#17806) @cherniavskii
49
+ - [DataGrid] Fix column spanning jump on scroll (#17780) @cherniavskii
50
+ - [DataGrid] Fix content rendering for large rows while using automatic page size (#17866) @campmarc
51
+
52
+ #### `@mui/x-data-grid-pro@7.29.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
53
+
54
+ Same changes as in `@mui/x-data-grid@7.29.4`, plus:
55
+
56
+ - [DataGridPro] Add `aria-expanded` attribute to the master detail toggle button (#17890) @whereisrmsqhs
57
+ - [DataGridPro] Prevent text selection when reordering rows (#17920) @jyash97
58
+
59
+ #### `@mui/x-data-grid-premium@7.29.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
60
+
61
+ Same changes as in `@mui/x-data-grid-pro@7.29.4`.
62
+
63
+ ### Date and Time Pickers
64
+
65
+ #### `@mui/x-date-pickers@7.29.4`
66
+
67
+ - [pickers] Fix `PickersTextField` overflow (#17945) @noraleonte
68
+
69
+ #### `@mui/x-date-pickers-pro@7.29.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
70
+
71
+ Same changes as in `@mui/x-date-pickers@7.29.4`.
72
+
73
+ ### Docs
74
+
75
+ - [docs] Add "upgrade to v8" callout on v7 planned pages (#17901) @mapache-salvaje
76
+
6
77
  ## 7.29.3
7
78
 
8
79
  _May 8, 2025_
@@ -639,7 +639,7 @@ export const GridRootStyles = styled('div', {
639
639
  borderTop: 'none'
640
640
  }
641
641
  },
642
- [`&.${c['root--disableUserSelection']} .${c.cell}`]: {
642
+ [`&.${c['root--disableUserSelection']}`]: {
643
643
  userSelect: 'none'
644
644
  },
645
645
  [`& .${c['row--dynamicHeight']} > .${c.cell}`]: {
@@ -299,13 +299,21 @@ export function getFirstNonSpannedColumnToRender({
299
299
  visibleRows
300
300
  }) {
301
301
  let firstNonSpannedColumnToRender = firstColumnToRender;
302
- for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
303
- const row = visibleRows[i];
304
- if (row) {
305
- const rowId = visibleRows[i].id;
306
- const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstColumnToRender);
307
- if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {
308
- firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
302
+ let foundStableColumn = false;
303
+
304
+ // Keep checking columns until we find one that's not spanned in any visible row
305
+ while (!foundStableColumn) {
306
+ foundStableColumn = true;
307
+ for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
308
+ const row = visibleRows[i];
309
+ if (row) {
310
+ const rowId = visibleRows[i].id;
311
+ const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);
312
+ if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {
313
+ firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
314
+ foundStableColumn = false;
315
+ break; // Check the new column index against the visible rows, because it might be spanned
316
+ }
309
317
  }
310
318
  }
311
319
  }
@@ -138,7 +138,7 @@ export const useGridPaginationModel = (apiRef, props) => {
138
138
  return;
139
139
  }
140
140
  const dimensions = apiRef.current.getRootDimensions();
141
- const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
141
+ const maximumPageSizeWithoutScrollBar = Math.max(1, Math.floor(dimensions.viewportInnerSize.height / rowHeight));
142
142
  apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);
143
143
  }, [apiRef, props.autoPageSize, rowHeight]);
144
144
  const handleRowCountChange = React.useCallback(newRowCount => {
@@ -194,7 +194,10 @@ export const useGridRowsMeta = (apiRef, props) => {
194
194
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
195
195
  }
196
196
  if (!isHeightMetaValid.current) {
197
- apiRef.current.requestPipeProcessorsApplication('rowHeight');
197
+ // Avoids "ResizeObserver loop completed with undelivered notifications" error
198
+ requestAnimationFrame(() => {
199
+ apiRef.current.requestPipeProcessorsApplication('rowHeight');
200
+ });
198
201
  }
199
202
  })).current;
200
203
  const observeRowHeight = (element, rowId) => {
@@ -217,12 +217,13 @@ export const useGridVirtualScroller = () => {
217
217
  scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
218
218
  const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
219
219
  const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
220
-
221
- // Prevents batching render context changes
222
- ReactDOM.flushSync(() => {
223
- updateRenderContext(nextRenderContext);
224
- });
225
- scrollTimeout.start(1000, triggerUpdateRenderContext);
220
+ if (!areRenderContextsEqual(nextRenderContext, renderContext)) {
221
+ // Prevents batching render context changes
222
+ ReactDOM.flushSync(() => {
223
+ updateRenderContext(nextRenderContext);
224
+ });
225
+ scrollTimeout.start(1000, triggerUpdateRenderContext);
226
+ }
226
227
  return nextRenderContext;
227
228
  });
228
229
  const forceUpdateRenderContext = () => {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.29.3
2
+ * @mui/x-data-grid v7.29.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -639,7 +639,7 @@ export const GridRootStyles = styled('div', {
639
639
  borderTop: 'none'
640
640
  }
641
641
  },
642
- [`&.${c['root--disableUserSelection']} .${c.cell}`]: {
642
+ [`&.${c['root--disableUserSelection']}`]: {
643
643
  userSelect: 'none'
644
644
  },
645
645
  [`& .${c['row--dynamicHeight']} > .${c.cell}`]: {
@@ -299,13 +299,21 @@ export function getFirstNonSpannedColumnToRender({
299
299
  visibleRows
300
300
  }) {
301
301
  let firstNonSpannedColumnToRender = firstColumnToRender;
302
- for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
303
- const row = visibleRows[i];
304
- if (row) {
305
- const rowId = visibleRows[i].id;
306
- const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstColumnToRender);
307
- if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {
308
- firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
302
+ let foundStableColumn = false;
303
+
304
+ // Keep checking columns until we find one that's not spanned in any visible row
305
+ while (!foundStableColumn) {
306
+ foundStableColumn = true;
307
+ for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
308
+ const row = visibleRows[i];
309
+ if (row) {
310
+ const rowId = visibleRows[i].id;
311
+ const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);
312
+ if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {
313
+ firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
314
+ foundStableColumn = false;
315
+ break; // Check the new column index against the visible rows, because it might be spanned
316
+ }
309
317
  }
310
318
  }
311
319
  }
@@ -138,7 +138,7 @@ export const useGridPaginationModel = (apiRef, props) => {
138
138
  return;
139
139
  }
140
140
  const dimensions = apiRef.current.getRootDimensions();
141
- const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
141
+ const maximumPageSizeWithoutScrollBar = Math.max(1, Math.floor(dimensions.viewportInnerSize.height / rowHeight));
142
142
  apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);
143
143
  }, [apiRef, props.autoPageSize, rowHeight]);
144
144
  const handleRowCountChange = React.useCallback(newRowCount => {
@@ -194,7 +194,10 @@ export const useGridRowsMeta = (apiRef, props) => {
194
194
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
195
195
  }
196
196
  if (!isHeightMetaValid.current) {
197
- apiRef.current.requestPipeProcessorsApplication('rowHeight');
197
+ // Avoids "ResizeObserver loop completed with undelivered notifications" error
198
+ requestAnimationFrame(() => {
199
+ apiRef.current.requestPipeProcessorsApplication('rowHeight');
200
+ });
198
201
  }
199
202
  })).current;
200
203
  const observeRowHeight = (element, rowId) => {
@@ -217,12 +217,13 @@ export const useGridVirtualScroller = () => {
217
217
  scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
218
218
  const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
219
219
  const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
220
-
221
- // Prevents batching render context changes
222
- ReactDOM.flushSync(() => {
223
- updateRenderContext(nextRenderContext);
224
- });
225
- scrollTimeout.start(1000, triggerUpdateRenderContext);
220
+ if (!areRenderContextsEqual(nextRenderContext, renderContext)) {
221
+ // Prevents batching render context changes
222
+ ReactDOM.flushSync(() => {
223
+ updateRenderContext(nextRenderContext);
224
+ });
225
+ scrollTimeout.start(1000, triggerUpdateRenderContext);
226
+ }
226
227
  return nextRenderContext;
227
228
  });
228
229
  const forceUpdateRenderContext = () => {
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.29.3
2
+ * @mui/x-data-grid v7.29.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -646,7 +646,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
646
646
  borderTop: 'none'
647
647
  }
648
648
  },
649
- [`&.${_gridClasses.gridClasses['root--disableUserSelection']} .${_gridClasses.gridClasses.cell}`]: {
649
+ [`&.${_gridClasses.gridClasses['root--disableUserSelection']}`]: {
650
650
  userSelect: 'none'
651
651
  },
652
652
  [`& .${_gridClasses.gridClasses['row--dynamicHeight']} > .${_gridClasses.gridClasses.cell}`]: {
@@ -314,13 +314,21 @@ function getFirstNonSpannedColumnToRender({
314
314
  visibleRows
315
315
  }) {
316
316
  let firstNonSpannedColumnToRender = firstColumnToRender;
317
- for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
318
- const row = visibleRows[i];
319
- if (row) {
320
- const rowId = visibleRows[i].id;
321
- const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstColumnToRender);
322
- if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan) {
323
- firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
317
+ let foundStableColumn = false;
318
+
319
+ // Keep checking columns until we find one that's not spanned in any visible row
320
+ while (!foundStableColumn) {
321
+ foundStableColumn = true;
322
+ for (let i = firstRowToRender; i < lastRowToRender; i += 1) {
323
+ const row = visibleRows[i];
324
+ if (row) {
325
+ const rowId = visibleRows[i].id;
326
+ const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, firstNonSpannedColumnToRender);
327
+ if (cellColSpanInfo && cellColSpanInfo.spannedByColSpan && cellColSpanInfo.leftVisibleCellIndex < firstNonSpannedColumnToRender) {
328
+ firstNonSpannedColumnToRender = cellColSpanInfo.leftVisibleCellIndex;
329
+ foundStableColumn = false;
330
+ break; // Check the new column index against the visible rows, because it might be spanned
331
+ }
324
332
  }
325
333
  }
326
334
  }
@@ -147,7 +147,7 @@ const useGridPaginationModel = (apiRef, props) => {
147
147
  return;
148
148
  }
149
149
  const dimensions = apiRef.current.getRootDimensions();
150
- const maximumPageSizeWithoutScrollBar = Math.floor(dimensions.viewportInnerSize.height / rowHeight);
150
+ const maximumPageSizeWithoutScrollBar = Math.max(1, Math.floor(dimensions.viewportInnerSize.height / rowHeight));
151
151
  apiRef.current.setPageSize(maximumPageSizeWithoutScrollBar);
152
152
  }, [apiRef, props.autoPageSize, rowHeight]);
153
153
  const handleRowCountChange = React.useCallback(newRowCount => {
@@ -203,7 +203,10 @@ const useGridRowsMeta = (apiRef, props) => {
203
203
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
204
204
  }
205
205
  if (!isHeightMetaValid.current) {
206
- apiRef.current.requestPipeProcessorsApplication('rowHeight');
206
+ // Avoids "ResizeObserver loop completed with undelivered notifications" error
207
+ requestAnimationFrame(() => {
208
+ apiRef.current.requestPipeProcessorsApplication('rowHeight');
209
+ });
207
210
  }
208
211
  })).current;
209
212
  const observeRowHeight = (element, rowId) => {
@@ -228,12 +228,13 @@ const useGridVirtualScroller = () => {
228
228
  scrollCache.buffer = bufferForDirection(isRtl, direction, rootProps.rowBufferPx, rootProps.columnBufferPx, rowHeight * 15, MINIMUM_COLUMN_WIDTH * 6);
229
229
  const inputs = inputsSelector(apiRef, rootProps, enabledForRows, enabledForColumns);
230
230
  const nextRenderContext = computeRenderContext(inputs, scrollPosition.current, scrollCache);
231
-
232
- // Prevents batching render context changes
233
- ReactDOM.flushSync(() => {
234
- updateRenderContext(nextRenderContext);
235
- });
236
- scrollTimeout.start(1000, triggerUpdateRenderContext);
231
+ if (!areRenderContextsEqual(nextRenderContext, renderContext)) {
232
+ // Prevents batching render context changes
233
+ ReactDOM.flushSync(() => {
234
+ updateRenderContext(nextRenderContext);
235
+ });
236
+ scrollTimeout.start(1000, triggerUpdateRenderContext);
237
+ }
237
238
  return nextRenderContext;
238
239
  });
239
240
  const forceUpdateRenderContext = () => {
package/node/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v7.29.3
2
+ * @mui/x-data-grid v7.29.5
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "7.29.3",
3
+ "version": "7.29.5",
4
4
  "description": "The Community plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./node/index.js",