@mui/x-data-grid 8.13.0 → 8.14.0
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 +171 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +3 -2
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +34 -0
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +1 -34
- package/esm/hooks/features/dataSource/useGridDataSourceBase.js +7 -5
- package/esm/hooks/features/dataSource/utils.js +2 -4
- package/esm/hooks/features/rows/useGridRows.js +4 -4
- package/esm/index.js +1 -1
- package/esm/locales/ptBR.js +117 -128
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.d.ts +3 -2
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +37 -1
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +3 -36
- package/hooks/features/dataSource/useGridDataSourceBase.js +7 -5
- package/hooks/features/dataSource/utils.js +2 -4
- package/hooks/features/rows/useGridRows.js +4 -4
- package/index.js +1 -1
- package/locales/ptBR.js +117 -128
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,176 @@
|
|
|
5
5
|
All notable changes to this project will be documented in this file.
|
|
6
6
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
7
7
|
|
|
8
|
+
## 8.14.0
|
|
9
|
+
|
|
10
|
+
_Oct 9, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 The [Chart zoom now supports the `pressAndDrag` gesture](https://mui.com/x/react-charts/zoom-and-pan/#zoom-interactions-configuration). Pan by pressing and dragging.
|
|
15
|
+
- 🔄 [Server-side pivoting](https://mui.com/x/react-data-grid/server-side-data/pivoting/) support for the Data Grid
|
|
16
|
+
- 🐞 Bugfixes
|
|
17
|
+
- 📚 Documentation improvements
|
|
18
|
+
|
|
19
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
20
|
+
@djpremier, @Utkarsh-0304
|
|
21
|
+
|
|
22
|
+
The following are all team members who have contributed to this release:
|
|
23
|
+
@alexfauquette, @bernardobelchior, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @prakhargupta1, @rita-codes, @noraleonte, @brijeshb42, @arminmeh, @michelengelen
|
|
24
|
+
|
|
25
|
+
### Data Grid
|
|
26
|
+
|
|
27
|
+
#### `@mui/x-data-grid@8.14.0`
|
|
28
|
+
|
|
29
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#19658) @djpremier
|
|
30
|
+
|
|
31
|
+
#### `@mui/x-data-grid-pro@8.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
32
|
+
|
|
33
|
+
Same changes as in `@mui/x-data-grid@8.14.0`.
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-premium@8.14.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid-pro@8.14.0`, plus:
|
|
38
|
+
|
|
39
|
+
- [DataGridPremium] Server-side pivoting (#19575) @arminmeh
|
|
40
|
+
|
|
41
|
+
### Date and Time Pickers
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers@8.14.0`
|
|
44
|
+
|
|
45
|
+
- [pickers] Fixed the extra element for the disabled date picker (#19387) @Utkarsh-0304
|
|
46
|
+
- [pickers] Fix input `autoCapitalize` value for Firefox compatibility (#19285) @michelengelen
|
|
47
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#19658) @djpremier
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers-pro@8.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-date-pickers@8.14.0`.
|
|
52
|
+
|
|
53
|
+
### Charts
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts@8.14.0`
|
|
56
|
+
|
|
57
|
+
- [charts] Add `pressAndDrag` pan gesture (#19779) @JCQuintas
|
|
58
|
+
- [charts] Allow `minPointers` and `maxPointers` to be configured by pointer type (#19794) @JCQuintas
|
|
59
|
+
- [charts] Correct scale domain types (#19844) @bernardobelchior
|
|
60
|
+
- [charts] Fix tooltip position when scrolling (#19857) @alexfauquette
|
|
61
|
+
- [charts] Link item highlight with keyboard navigation (#19768) @alexfauquette
|
|
62
|
+
- [charts] Refactor domain/scale selectors (#19832) @bernardobelchior
|
|
63
|
+
- [charts] Remove min/max from ordinal configuration (#19789) @alexfauquette
|
|
64
|
+
- [charts] Simplify axes filters selectors (#19833) @bernardobelchior
|
|
65
|
+
- [l10n] Improve Brazilian Portuguese (pt-BR) locale (#19658) @djpremier
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-charts-pro@8.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-charts@8.14.0`.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts-premium@8.14.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-charts-pro@8.14.0`.
|
|
74
|
+
|
|
75
|
+
### Tree View
|
|
76
|
+
|
|
77
|
+
#### `@mui/x-tree-view@8.14.0`
|
|
78
|
+
|
|
79
|
+
- [tree view] Fix Tree View tooltip anchoring on overview page (#19806) @noraleonte
|
|
80
|
+
|
|
81
|
+
#### `@mui/x-tree-view-pro@8.14.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
82
|
+
|
|
83
|
+
Same changes as in `@mui/x-tree-view@8.14.0`.
|
|
84
|
+
|
|
85
|
+
### Codemod
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-codemod@8.14.0`
|
|
88
|
+
|
|
89
|
+
Internal changes.
|
|
90
|
+
|
|
91
|
+
### Docs
|
|
92
|
+
|
|
93
|
+
- [docs] Add overview section for pie chart (#19672) @prakhargupta1
|
|
94
|
+
- [docs] Fix demo title knob keys (#19843) @JCQuintas
|
|
95
|
+
- [docs] Hide UI elements of unsupported features in the data source demos (#19849) @arminmeh
|
|
96
|
+
|
|
97
|
+
### Core
|
|
98
|
+
|
|
99
|
+
- [code-infra] Cleanup unused dependencies (#19788) @brijeshb42
|
|
100
|
+
- [code-infra] Fix pnpm-lock issue (#19861) @JCQuintas
|
|
101
|
+
- [code-infra] Improve publishing docs (#19404) @Janpot
|
|
102
|
+
- [code-infra] Remove tsconfig `baseUrl` (#19837) @Janpot
|
|
103
|
+
- [code-infra] Support custom npm dist tags during release (#19803) @Janpot
|
|
104
|
+
- [code-infra] Wait longer for print dialog (#19795) @JCQuintas
|
|
105
|
+
- [code-infra] Replace `lodash` with `es-toolkit` (#19853) @bernardobelchior
|
|
106
|
+
- [code-infra] Update release script PR checklist (#19785) @bernardobelchior
|
|
107
|
+
- [code-infra] Remove remaining usages of `lodash` (#19864) @bernardobelchior
|
|
108
|
+
- [docs-infra] Add `title` knob (#19792) @JCQuintas
|
|
109
|
+
- [docs-infra] Fix missing key in title knob (#19804) @JCQuintas
|
|
110
|
+
|
|
111
|
+
### Miscellaneous
|
|
112
|
+
|
|
113
|
+
- [x-telemetry] Fix transpile issues (#19761) @hasdfa
|
|
114
|
+
- [x-telemetry] Fix ref to deleted file (#19842) @JCQuintas
|
|
115
|
+
|
|
116
|
+
## 8.13.1
|
|
117
|
+
|
|
118
|
+
_Oct 1, 2025_
|
|
119
|
+
|
|
120
|
+
- 🐛 Fix `@mui/x-charts-pro` failure on import due to missing `@mui/x-internals` release
|
|
121
|
+
|
|
122
|
+
### Data Grid
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-data-grid@8.13.1`
|
|
125
|
+
|
|
126
|
+
Internal changes.
|
|
127
|
+
|
|
128
|
+
#### `@mui/x-data-grid-pro@8.13.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
129
|
+
|
|
130
|
+
Same changes as in `@mui/x-data-grid@8.13.1`.
|
|
131
|
+
|
|
132
|
+
#### `@mui/x-data-grid-premium@8.13.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
133
|
+
|
|
134
|
+
Same changes as in `@mui/x-data-grid-pro@8.13.1`.
|
|
135
|
+
|
|
136
|
+
### Date and Time Pickers
|
|
137
|
+
|
|
138
|
+
#### `@mui/x-date-pickers@8.12.0`
|
|
139
|
+
|
|
140
|
+
Internal changes.
|
|
141
|
+
|
|
142
|
+
#### `@mui/x-date-pickers-pro@8.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
143
|
+
|
|
144
|
+
Same changes as in `@mui/x-date-pickers@8.12.0`.
|
|
145
|
+
|
|
146
|
+
### Charts
|
|
147
|
+
|
|
148
|
+
#### `@mui/x-charts@8.13.1`
|
|
149
|
+
|
|
150
|
+
Internal changes.
|
|
151
|
+
|
|
152
|
+
#### `@mui/x-charts-pro@8.13.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
153
|
+
|
|
154
|
+
Same changes as in `@mui/x-charts@8.13.1`, plus:
|
|
155
|
+
|
|
156
|
+
- [charts-pro] Fix `@mui/x-charts-pro` failure on import due to missing `@mui/x-internals` release @bernardobelchior
|
|
157
|
+
|
|
158
|
+
#### `@mui/x-charts-premium@8.13.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
159
|
+
|
|
160
|
+
Same changes as in `@mui/x-charts-pro@8.13.1`.
|
|
161
|
+
|
|
162
|
+
### Tree View
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-tree-view@8.13.1`
|
|
165
|
+
|
|
166
|
+
Internal changes.
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-tree-view-pro@8.13.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
169
|
+
|
|
170
|
+
Same changes as in `@mui/x-tree-view@8.13.1`.
|
|
171
|
+
|
|
172
|
+
### Codemod
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-codemod@8.12.0`
|
|
175
|
+
|
|
176
|
+
Internal changes.
|
|
177
|
+
|
|
8
178
|
## 8.13.0
|
|
9
179
|
|
|
10
180
|
_Oct 1, 2025_
|
|
@@ -160,7 +330,7 @@ We'd like to extend a big thank you to the 15 contributors who made this release
|
|
|
160
330
|
|
|
161
331
|

|
|
162
332
|
|
|
163
|
-
|
|
333
|
+
👉 [🎥 Watch the full video](https://github.com/user-attachments/assets/28f1848e-dc85-4077-8756-a3e88afd4e54)
|
|
164
334
|
|
|
165
335
|
- ⌨️ Charts keyboard navigation
|
|
166
336
|
- ⚡️ Charts: Add new `renderer="svg-batch"` prop to Scatter charts that provides improved performance for large datasets
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { GridColumnGroupingModel, GridColumnGroup } from "../../../models/gridColumnGrouping.js";
|
|
1
|
+
import { GridColumnGroupingModel, GridColumnNode, GridColumnGroup } from "../../../models/gridColumnGrouping.js";
|
|
2
2
|
import { GridColDef } from "../../../models/colDef/index.js";
|
|
3
|
-
import { GridGroupingStructure } from "./gridColumnGroupsInterfaces.js";
|
|
3
|
+
import { GridColumnGroupLookup, GridGroupingStructure } from "./gridColumnGroupsInterfaces.js";
|
|
4
4
|
type UnwrappedGroupingModel = {
|
|
5
5
|
[key: GridColDef['field']]: GridColumnGroup['groupId'][];
|
|
6
6
|
};
|
|
7
|
+
export declare const createGroupLookup: (columnGroupingModel: GridColumnNode[]) => GridColumnGroupLookup;
|
|
7
8
|
/**
|
|
8
9
|
* This is a function that provide for each column the array of its parents.
|
|
9
10
|
* Parents are ordered from the root to the leaf.
|
|
@@ -1,4 +1,38 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
const _excluded = ["groupId", "children"];
|
|
1
4
|
import { isLeaf } from "../../../models/gridColumnGrouping.js";
|
|
5
|
+
export const createGroupLookup = columnGroupingModel => {
|
|
6
|
+
const groupLookup = {};
|
|
7
|
+
for (let i = 0; i < columnGroupingModel.length; i += 1) {
|
|
8
|
+
const node = columnGroupingModel[i];
|
|
9
|
+
if (isLeaf(node)) {
|
|
10
|
+
continue;
|
|
11
|
+
}
|
|
12
|
+
const {
|
|
13
|
+
groupId,
|
|
14
|
+
children
|
|
15
|
+
} = node,
|
|
16
|
+
other = _objectWithoutPropertiesLoose(node, _excluded);
|
|
17
|
+
if (!groupId) {
|
|
18
|
+
throw new Error('MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.');
|
|
19
|
+
}
|
|
20
|
+
if (process.env.NODE_ENV !== 'production' && !children) {
|
|
21
|
+
console.warn(`MUI X: group groupId=${groupId} has no children.`);
|
|
22
|
+
}
|
|
23
|
+
const groupParam = _extends({}, other, {
|
|
24
|
+
groupId
|
|
25
|
+
});
|
|
26
|
+
const subTreeLookup = createGroupLookup(children);
|
|
27
|
+
if (subTreeLookup[groupId] !== undefined || groupLookup[groupId] !== undefined) {
|
|
28
|
+
throw new Error(`MUI X: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);
|
|
29
|
+
}
|
|
30
|
+
Object.assign(groupLookup, subTreeLookup);
|
|
31
|
+
groupLookup[groupId] = groupParam;
|
|
32
|
+
}
|
|
33
|
+
return groupLookup;
|
|
34
|
+
};
|
|
35
|
+
|
|
2
36
|
// This is the recurrence function that help writing `unwrapGroupingColumnModel()`
|
|
3
37
|
const recurrentUnwrapGroupingColumnModel = (columnGroupNode, parents, unwrappedGroupingModelToComplete) => {
|
|
4
38
|
if (isLeaf(columnGroupNode)) {
|
|
@@ -1,45 +1,12 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
-
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["groupId", "children"];
|
|
6
4
|
import * as React from 'react';
|
|
7
|
-
import { isLeaf } from "../../../models/gridColumnGrouping.js";
|
|
8
5
|
import { gridColumnGroupsLookupSelector, gridColumnGroupsUnwrappedModelSelector } from "./gridColumnGroupsSelector.js";
|
|
9
6
|
import { useGridApiMethod } from "../../utils/useGridApiMethod.js";
|
|
10
|
-
import { getColumnGroupsHeaderStructure, unwrapGroupingColumnModel } from "./gridColumnGroupsUtils.js";
|
|
7
|
+
import { createGroupLookup, getColumnGroupsHeaderStructure, unwrapGroupingColumnModel } from "./gridColumnGroupsUtils.js";
|
|
11
8
|
import { useGridEvent } from "../../utils/useGridEvent.js";
|
|
12
9
|
import { gridColumnFieldsSelector, gridVisibleColumnFieldsSelector } from "../columns/index.js";
|
|
13
|
-
const createGroupLookup = columnGroupingModel => {
|
|
14
|
-
const groupLookup = {};
|
|
15
|
-
for (let i = 0; i < columnGroupingModel.length; i += 1) {
|
|
16
|
-
const node = columnGroupingModel[i];
|
|
17
|
-
if (isLeaf(node)) {
|
|
18
|
-
continue;
|
|
19
|
-
}
|
|
20
|
-
const {
|
|
21
|
-
groupId,
|
|
22
|
-
children
|
|
23
|
-
} = node,
|
|
24
|
-
other = _objectWithoutPropertiesLoose(node, _excluded);
|
|
25
|
-
if (!groupId) {
|
|
26
|
-
throw new Error('MUI X: An element of the columnGroupingModel does not have either `field` or `groupId`.');
|
|
27
|
-
}
|
|
28
|
-
if (process.env.NODE_ENV !== 'production' && !children) {
|
|
29
|
-
console.warn(`MUI X: group groupId=${groupId} has no children.`);
|
|
30
|
-
}
|
|
31
|
-
const groupParam = _extends({}, other, {
|
|
32
|
-
groupId
|
|
33
|
-
});
|
|
34
|
-
const subTreeLookup = createGroupLookup(children);
|
|
35
|
-
if (subTreeLookup[groupId] !== undefined || groupLookup[groupId] !== undefined) {
|
|
36
|
-
throw new Error(`MUI X: The groupId ${groupId} is used multiple times in the columnGroupingModel.`);
|
|
37
|
-
}
|
|
38
|
-
Object.assign(groupLookup, subTreeLookup);
|
|
39
|
-
groupLookup[groupId] = groupParam;
|
|
40
|
-
}
|
|
41
|
-
return groupLookup;
|
|
42
|
-
};
|
|
43
10
|
export const columnGroupsStateInitializer = (state, props, apiRef) => {
|
|
44
11
|
apiRef.current.caches.columnGrouping = {
|
|
45
12
|
lastColumnGroupingModel: props.columnGroupingModel
|
|
@@ -32,7 +32,10 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
32
32
|
const setStrategyAvailability = React.useCallback(() => {
|
|
33
33
|
apiRef.current.setStrategyAvailability(GridStrategyGroup.DataSource, DataSourceRowsUpdateStrategy.Default, props.dataSource ? () => true : () => false);
|
|
34
34
|
}, [apiRef, props.dataSource]);
|
|
35
|
-
const [
|
|
35
|
+
const [currentStrategy, setCurrentStrategy] = React.useState(apiRef.current.getActiveStrategy(GridStrategyGroup.DataSource));
|
|
36
|
+
const defaultRowsUpdateStrategyActive = React.useMemo(() => {
|
|
37
|
+
return currentStrategy === DataSourceRowsUpdateStrategy.Default;
|
|
38
|
+
}, [currentStrategy]);
|
|
36
39
|
const paginationModel = useGridSelector(apiRef, gridPaginationModelSelector);
|
|
37
40
|
const lastRequestId = React.useRef(0);
|
|
38
41
|
const onDataSourceErrorProp = props.onDataSourceError;
|
|
@@ -110,7 +113,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
110
113
|
}
|
|
111
114
|
}, [cacheChunkManager, cache, apiRef, defaultRowsUpdateStrategyActive, props.dataSource?.getRows, onDataSourceErrorProp, options, props.signature]);
|
|
112
115
|
const handleStrategyActivityChange = React.useCallback(() => {
|
|
113
|
-
|
|
116
|
+
setCurrentStrategy(apiRef.current.getActiveStrategy(GridStrategyGroup.DataSource));
|
|
114
117
|
}, [apiRef]);
|
|
115
118
|
const handleDataUpdate = React.useCallback(params => {
|
|
116
119
|
if ('error' in params) {
|
|
@@ -183,8 +186,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
183
186
|
React.useEffect(() => {
|
|
184
187
|
// Return early if the proper strategy isn't set yet
|
|
185
188
|
// Context: https://github.com/mui/mui-x/issues/19650
|
|
186
|
-
|
|
187
|
-
if (strategy !== DataSourceRowsUpdateStrategy.Default && strategy !== DataSourceRowsUpdateStrategy.LazyLoading) {
|
|
189
|
+
if (currentStrategy !== DataSourceRowsUpdateStrategy.Default && currentStrategy !== DataSourceRowsUpdateStrategy.LazyLoading) {
|
|
188
190
|
return undefined;
|
|
189
191
|
}
|
|
190
192
|
if (props.dataSource) {
|
|
@@ -195,7 +197,7 @@ export const useGridDataSourceBase = (apiRef, props, options = {}) => {
|
|
|
195
197
|
// ignore the current request on unmount
|
|
196
198
|
lastRequestId.current += 1;
|
|
197
199
|
};
|
|
198
|
-
}, [apiRef, props.dataSource]);
|
|
200
|
+
}, [apiRef, props.dataSource, currentStrategy]);
|
|
199
201
|
return {
|
|
200
202
|
api: {
|
|
201
203
|
public: dataSourceApi
|
|
@@ -60,10 +60,8 @@ export class CacheChunkManager {
|
|
|
60
60
|
if (responses.length === 1) {
|
|
61
61
|
return responses[0];
|
|
62
62
|
}
|
|
63
|
-
return responses.reduce((acc, response) => ({
|
|
64
|
-
rows: [...acc.rows, ...response.rows]
|
|
65
|
-
rowCount: response.rowCount,
|
|
66
|
-
pageInfo: response.pageInfo
|
|
63
|
+
return responses.reduce((acc, response) => _extends({}, response, {
|
|
64
|
+
rows: [...acc.rows, ...response.rows]
|
|
67
65
|
}), {
|
|
68
66
|
rows: [],
|
|
69
67
|
rowCount: 0,
|
|
@@ -105,7 +105,7 @@ export const useGridRows = (apiRef, props, configuration) => {
|
|
|
105
105
|
*/
|
|
106
106
|
const setRows = React.useCallback(rows => {
|
|
107
107
|
logger.debug(`Updating all rows, new length ${rows.length}`);
|
|
108
|
-
if (gridPivotActiveSelector(apiRef)) {
|
|
108
|
+
if (!props.dataSource && gridPivotActiveSelector(apiRef)) {
|
|
109
109
|
apiRef.current.updateNonPivotRows(rows, false);
|
|
110
110
|
return;
|
|
111
111
|
}
|
|
@@ -121,12 +121,12 @@ export const useGridRows = (apiRef, props, configuration) => {
|
|
|
121
121
|
cache,
|
|
122
122
|
throttle: true
|
|
123
123
|
});
|
|
124
|
-
}, [logger, props.getRowId, props.loading, props.rowCount, throttledRowsChange, apiRef]);
|
|
124
|
+
}, [logger, props.getRowId, props.dataSource, props.loading, props.rowCount, throttledRowsChange, apiRef]);
|
|
125
125
|
const updateRows = React.useCallback(updates => {
|
|
126
126
|
if (props.signature === GridSignature.DataGrid && updates.length > 1) {
|
|
127
127
|
throw new Error(['MUI X: You cannot update several rows at once in `apiRef.current.updateRows` on the DataGrid.', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
|
|
128
128
|
}
|
|
129
|
-
if (gridPivotActiveSelector(apiRef)) {
|
|
129
|
+
if (!props.dataSource && gridPivotActiveSelector(apiRef)) {
|
|
130
130
|
apiRef.current.updateNonPivotRows(updates);
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
@@ -140,7 +140,7 @@ export const useGridRows = (apiRef, props, configuration) => {
|
|
|
140
140
|
cache,
|
|
141
141
|
throttle: true
|
|
142
142
|
});
|
|
143
|
-
}, [props.signature, props.getRowId, throttledRowsChange, apiRef]);
|
|
143
|
+
}, [props.signature, props.dataSource, props.getRowId, throttledRowsChange, apiRef]);
|
|
144
144
|
const updateNestedRows = React.useCallback((updates, groupKeys) => {
|
|
145
145
|
const nonPinnedRowsUpdates = computeRowsUpdates(apiRef, updates, props.getRowId);
|
|
146
146
|
const cache = updateCacheWithNewRows({
|
package/esm/index.js
CHANGED