@mui/x-data-grid 7.29.4 → 7.29.6
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 +48 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +3 -3
- package/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +9 -5
- package/hooks/features/rows/useGridRowsMeta.js +4 -1
- package/index.js +1 -1
- package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +3 -3
- package/modern/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +9 -5
- package/modern/hooks/features/rows/useGridRowsMeta.js +4 -1
- package/modern/index.js +1 -1
- package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +3 -3
- package/node/hooks/features/rowSelection/useGridRowSelectionPreProcessors.js +9 -5
- package/node/hooks/features/rows/useGridRowsMeta.js +4 -1
- package/node/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,54 @@
|
|
|
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.6
|
|
7
|
+
|
|
8
|
+
_Jun 6, 2025_
|
|
9
|
+
|
|
10
|
+
We'd like to extend a big thank you to @arminmeh, who made this release possible.
|
|
11
|
+
|
|
12
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
13
|
+
|
|
14
|
+
### Data Grid
|
|
15
|
+
|
|
16
|
+
#### `@mui/x-data-grid@7.29.6`
|
|
17
|
+
|
|
18
|
+
- [DataGrid] Keep pipe pre-processors execution order when callback reference changes (#18217) @arminmeh
|
|
19
|
+
|
|
20
|
+
#### `@mui/x-data-grid-pro@7.29.6` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
21
|
+
|
|
22
|
+
Same changes as in `@mui/x-data-grid@7.29.6`.
|
|
23
|
+
|
|
24
|
+
#### `@mui/x-data-grid-premium@7.29.6` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
25
|
+
|
|
26
|
+
Same changes as in `@mui/x-data-grid-pro@7.29.6`.
|
|
27
|
+
|
|
28
|
+
### Docs
|
|
29
|
+
|
|
30
|
+
- [docs] Keep `groupingColDef` reference stable in the grid demos (#17549) @arminmeh
|
|
31
|
+
|
|
32
|
+
## 7.29.5
|
|
33
|
+
|
|
34
|
+
_May 29, 2025_
|
|
35
|
+
|
|
36
|
+
We'd like to extend a big thank you to @cherniavskii, who made this release possible.
|
|
37
|
+
|
|
38
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
39
|
+
|
|
40
|
+
### Data Grid
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid@7.29.5`
|
|
43
|
+
|
|
44
|
+
- [DataGrid] Avoid ResizeObserver loop error (@cherniavskii) (#18005) @github-actions[bot]
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-data-grid-pro@7.29.5` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
|
+
|
|
48
|
+
Same changes as in `@mui/x-data-grid@7.29.5`.
|
|
49
|
+
|
|
50
|
+
#### `@mui/x-data-grid-premium@7.29.5` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
51
|
+
|
|
52
|
+
Same changes as in `@mui/x-data-grid-pro@7.29.5`.
|
|
53
|
+
|
|
6
54
|
## 7.29.4
|
|
7
55
|
|
|
8
56
|
_May 22, 2025_
|
|
@@ -56,12 +56,12 @@ export const useGridPipeProcessing = apiRef => {
|
|
|
56
56
|
const oldProcessor = groupCache.processors.get(id);
|
|
57
57
|
if (oldProcessor !== processor) {
|
|
58
58
|
groupCache.processors.set(id, processor);
|
|
59
|
-
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
59
|
+
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
60
60
|
runAppliers(groupCache);
|
|
61
61
|
}
|
|
62
62
|
return () => {
|
|
63
|
-
cache.current[group].processors.
|
|
64
|
-
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
63
|
+
cache.current[group].processors.set(id, null);
|
|
64
|
+
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
65
65
|
};
|
|
66
66
|
}, [runAppliers]);
|
|
67
67
|
const registerPipeApplier = React.useCallback((group, id, applier) => {
|
|
@@ -28,17 +28,21 @@ export const useGridRowSelectionPreProcessors = (apiRef, props) => {
|
|
|
28
28
|
headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')
|
|
29
29
|
});
|
|
30
30
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
31
|
-
const
|
|
32
|
-
if (shouldHaveSelectionColumn && !
|
|
31
|
+
const hasSelectionColumn = columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
32
|
+
if (shouldHaveSelectionColumn && !hasSelectionColumn) {
|
|
33
33
|
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
34
34
|
columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];
|
|
35
|
-
} else if (!shouldHaveSelectionColumn &&
|
|
35
|
+
} else if (!shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
36
36
|
delete columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD];
|
|
37
37
|
columnsState.orderedFields = columnsState.orderedFields.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD);
|
|
38
|
-
} else if (shouldHaveSelectionColumn &&
|
|
38
|
+
} else if (shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
39
39
|
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = _extends({}, selectionColumn, columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD]);
|
|
40
|
+
// If the column is not in the columns array (not a custom selection column), move it to the beginning of the column order
|
|
41
|
+
if (!props.columns.some(col => col.field === GRID_CHECKBOX_SELECTION_FIELD)) {
|
|
42
|
+
columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD)];
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
return columnsState;
|
|
42
|
-
}, [apiRef, classes, props.checkboxSelection]);
|
|
46
|
+
}, [apiRef, classes, props.columns, props.checkboxSelection]);
|
|
43
47
|
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateSelectionColumn);
|
|
44
48
|
};
|
|
@@ -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
|
-
|
|
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) => {
|
package/index.js
CHANGED
|
@@ -56,12 +56,12 @@ export const useGridPipeProcessing = apiRef => {
|
|
|
56
56
|
const oldProcessor = groupCache.processors.get(id);
|
|
57
57
|
if (oldProcessor !== processor) {
|
|
58
58
|
groupCache.processors.set(id, processor);
|
|
59
|
-
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
59
|
+
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
60
60
|
runAppliers(groupCache);
|
|
61
61
|
}
|
|
62
62
|
return () => {
|
|
63
|
-
cache.current[group].processors.
|
|
64
|
-
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
63
|
+
cache.current[group].processors.set(id, null);
|
|
64
|
+
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
65
65
|
};
|
|
66
66
|
}, [runAppliers]);
|
|
67
67
|
const registerPipeApplier = React.useCallback((group, id, applier) => {
|
|
@@ -28,17 +28,21 @@ export const useGridRowSelectionPreProcessors = (apiRef, props) => {
|
|
|
28
28
|
headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')
|
|
29
29
|
});
|
|
30
30
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
31
|
-
const
|
|
32
|
-
if (shouldHaveSelectionColumn && !
|
|
31
|
+
const hasSelectionColumn = columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
32
|
+
if (shouldHaveSelectionColumn && !hasSelectionColumn) {
|
|
33
33
|
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
34
34
|
columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];
|
|
35
|
-
} else if (!shouldHaveSelectionColumn &&
|
|
35
|
+
} else if (!shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
36
36
|
delete columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD];
|
|
37
37
|
columnsState.orderedFields = columnsState.orderedFields.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD);
|
|
38
|
-
} else if (shouldHaveSelectionColumn &&
|
|
38
|
+
} else if (shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
39
39
|
columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD] = _extends({}, selectionColumn, columnsState.lookup[GRID_CHECKBOX_SELECTION_FIELD]);
|
|
40
|
+
// If the column is not in the columns array (not a custom selection column), move it to the beginning of the column order
|
|
41
|
+
if (!props.columns.some(col => col.field === GRID_CHECKBOX_SELECTION_FIELD)) {
|
|
42
|
+
columnsState.orderedFields = [GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields.filter(field => field !== GRID_CHECKBOX_SELECTION_FIELD)];
|
|
43
|
+
}
|
|
40
44
|
}
|
|
41
45
|
return columnsState;
|
|
42
|
-
}, [apiRef, classes, props.checkboxSelection]);
|
|
46
|
+
}, [apiRef, classes, props.columns, props.checkboxSelection]);
|
|
43
47
|
useGridRegisterPipeProcessor(apiRef, 'hydrateColumns', updateSelectionColumn);
|
|
44
48
|
};
|
|
@@ -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
|
-
|
|
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) => {
|
package/modern/index.js
CHANGED
|
@@ -64,12 +64,12 @@ const useGridPipeProcessing = apiRef => {
|
|
|
64
64
|
const oldProcessor = groupCache.processors.get(id);
|
|
65
65
|
if (oldProcessor !== processor) {
|
|
66
66
|
groupCache.processors.set(id, processor);
|
|
67
|
-
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
67
|
+
groupCache.processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
68
68
|
runAppliers(groupCache);
|
|
69
69
|
}
|
|
70
70
|
return () => {
|
|
71
|
-
cache.current[group].processors.
|
|
72
|
-
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values());
|
|
71
|
+
cache.current[group].processors.set(id, null);
|
|
72
|
+
cache.current[group].processorsAsArray = Array.from(cache.current[group].processors.values()).filter(processorValue => processorValue !== null);
|
|
73
73
|
};
|
|
74
74
|
}, [runAppliers]);
|
|
75
75
|
const registerPipeApplier = React.useCallback((group, id, applier) => {
|
|
@@ -36,18 +36,22 @@ const useGridRowSelectionPreProcessors = (apiRef, props) => {
|
|
|
36
36
|
headerName: apiRef.current.getLocaleText('checkboxSelectionHeaderName')
|
|
37
37
|
});
|
|
38
38
|
const shouldHaveSelectionColumn = props.checkboxSelection;
|
|
39
|
-
const
|
|
40
|
-
if (shouldHaveSelectionColumn && !
|
|
39
|
+
const hasSelectionColumn = columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] != null;
|
|
40
|
+
if (shouldHaveSelectionColumn && !hasSelectionColumn) {
|
|
41
41
|
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = selectionColumn;
|
|
42
42
|
columnsState.orderedFields = [_colDef.GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields];
|
|
43
|
-
} else if (!shouldHaveSelectionColumn &&
|
|
43
|
+
} else if (!shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
44
44
|
delete columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD];
|
|
45
45
|
columnsState.orderedFields = columnsState.orderedFields.filter(field => field !== _colDef.GRID_CHECKBOX_SELECTION_FIELD);
|
|
46
|
-
} else if (shouldHaveSelectionColumn &&
|
|
46
|
+
} else if (shouldHaveSelectionColumn && hasSelectionColumn) {
|
|
47
47
|
columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD] = (0, _extends2.default)({}, selectionColumn, columnsState.lookup[_colDef.GRID_CHECKBOX_SELECTION_FIELD]);
|
|
48
|
+
// If the column is not in the columns array (not a custom selection column), move it to the beginning of the column order
|
|
49
|
+
if (!props.columns.some(col => col.field === _colDef.GRID_CHECKBOX_SELECTION_FIELD)) {
|
|
50
|
+
columnsState.orderedFields = [_colDef.GRID_CHECKBOX_SELECTION_FIELD, ...columnsState.orderedFields.filter(field => field !== _colDef.GRID_CHECKBOX_SELECTION_FIELD)];
|
|
51
|
+
}
|
|
48
52
|
}
|
|
49
53
|
return columnsState;
|
|
50
|
-
}, [apiRef, classes, props.checkboxSelection]);
|
|
54
|
+
}, [apiRef, classes, props.columns, props.checkboxSelection]);
|
|
51
55
|
(0, _pipeProcessing.useGridRegisterPipeProcessor)(apiRef, 'hydrateColumns', updateSelectionColumn);
|
|
52
56
|
};
|
|
53
57
|
exports.useGridRowSelectionPreProcessors = useGridRowSelectionPreProcessors;
|
|
@@ -203,7 +203,10 @@ const useGridRowsMeta = (apiRef, props) => {
|
|
|
203
203
|
apiRef.current.unstable_storeRowHeightMeasurement(rowId, height);
|
|
204
204
|
}
|
|
205
205
|
if (!isHeightMetaValid.current) {
|
|
206
|
-
|
|
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) => {
|
package/node/index.js
CHANGED