@mui/x-data-grid-pro 8.14.0 → 8.14.1
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 +95 -0
- package/DataGridPro/DataGridPro.js +1 -1
- package/esm/DataGridPro/DataGridPro.js +1 -1
- package/esm/hooks/features/dataSource/useGridDataSourceBasePro.js +2 -2
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +0 -1
- package/esm/internals/index.js +0 -1
- package/esm/utils/tree/insertDataRowInTree.d.ts +1 -8
- package/esm/utils/tree/insertDataRowInTree.js +1 -6
- package/esm/utils/tree/removeDataRowFromTree.d.ts +1 -8
- package/esm/utils/tree/removeDataRowFromTree.js +4 -12
- package/esm/utils/tree/updateRowTree.js +1 -9
- package/esm/utils/tree/utils.d.ts +1 -2
- package/esm/utils/tree/utils.js +0 -9
- package/hooks/features/dataSource/useGridDataSourceBasePro.js +2 -2
- package/index.js +1 -1
- package/internals/index.d.ts +0 -1
- package/internals/index.js +8 -16
- package/package.json +4 -4
- package/utils/tree/insertDataRowInTree.d.ts +1 -8
- package/utils/tree/insertDataRowInTree.js +1 -6
- package/utils/tree/removeDataRowFromTree.d.ts +1 -8
- package/utils/tree/removeDataRowFromTree.js +4 -12
- package/utils/tree/updateRowTree.js +0 -8
- package/utils/tree/utils.d.ts +1 -2
- package/utils/tree/utils.js +1 -11
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,101 @@
|
|
|
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.1
|
|
9
|
+
|
|
10
|
+
_Oct 16, 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
|
+
- 🚀 Charts have optimized data structures for closest point calculations — initial render times reduced by ~25% for 1,000+ data points, with greater gains at larger scales (#19790) @bernardobelchior
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
- 📚 Documentation improvements
|
|
17
|
+
|
|
18
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
19
|
+
@djpremier, @jacknot, @justdoit1897, @mellis481, @sai6855
|
|
20
|
+
|
|
21
|
+
The following are all team members who have contributed to this release:
|
|
22
|
+
@arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @noraleonte, @siriwatknp
|
|
23
|
+
|
|
24
|
+
### Data Grid
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid@8.14.1`
|
|
27
|
+
|
|
28
|
+
- [DataGrid] Fix cell not rerendering on `isCellEditable` prop change (#19898) @cherniavskii
|
|
29
|
+
- [DataGrid] Fix virtualizer memory leaks (#19886) @cherniavskii
|
|
30
|
+
- [DataGrid] Fix tree data unable to deselect row for exclude model (#19846) @siriwatknp
|
|
31
|
+
- [l10n] Improve Italian (it-IT) locale (#19322) @jacknot and (#19940) @justdoit1897
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-pro@8.14.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid@8.14.1`, plus:
|
|
36
|
+
|
|
37
|
+
- [DataGridPro] Clear cache before new request to the nested request queue after a row has been edited (#19873) @arminmeh
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-data-grid-premium@8.14.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
40
|
+
|
|
41
|
+
Same changes as in `@mui/x-data-grid-pro@8.14.1`.
|
|
42
|
+
|
|
43
|
+
### Date and Time Pickers
|
|
44
|
+
|
|
45
|
+
#### `@mui/x-date-pickers@8.14.1`
|
|
46
|
+
|
|
47
|
+
Internal changes.
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers-pro@8.14.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-date-pickers@8.14.1`.
|
|
52
|
+
|
|
53
|
+
### Charts
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-charts@8.14.1`
|
|
56
|
+
|
|
57
|
+
- [charts] Fix `minBarSize` when y-axis is reversed (#19932) @bernardobelchior
|
|
58
|
+
- [charts] Fix bar chart border radius when axis is reversed (#19895) @bernardobelchior
|
|
59
|
+
- [charts] Fix scatter chart `datasetKeys.id` not being optional (#19897) @bernardobelchior
|
|
60
|
+
- [charts] Use more performant data structure for closest point (#19790) @bernardobelchior
|
|
61
|
+
- [charts] Fix `GaugeValueArc` having wrong class (#19965) @bernardobelchior
|
|
62
|
+
- [charts] Fix `undefined` path when highlight empty line chart axis (#19969) @bernardobelchior
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts-pro@8.14.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-charts@8.14.1`, plus:
|
|
67
|
+
|
|
68
|
+
- [charts-pro] Add `highlighting` to Sankey chart (#19662) @JCQuintas
|
|
69
|
+
|
|
70
|
+
#### `@mui/x-charts-premium@8.14.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
71
|
+
|
|
72
|
+
Same changes as in `@mui/x-charts-pro@8.14.1`.
|
|
73
|
+
|
|
74
|
+
### Tree View
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-tree-view@8.14.1`
|
|
77
|
+
|
|
78
|
+
- [tree view] Do not forward the `ownerState` to the icon (#19772) @flaviendelangle
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-tree-view-pro@8.14.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-tree-view@8.14.1`.
|
|
83
|
+
|
|
84
|
+
### Codemod
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-codemod@8.14.0`
|
|
87
|
+
|
|
88
|
+
Internal changes.
|
|
89
|
+
|
|
90
|
+
### Docs
|
|
91
|
+
|
|
92
|
+
- [docs] Add `'bumpX'` and `'bumpY'` curve types to the interpolation demo (#19676) @djpremier
|
|
93
|
+
- [docs] Add scatter chart with linear regression demo (#19900) @bernardobelchior
|
|
94
|
+
- [docs] Correctly describe Data Grid's row selection behavior (#19968) @arminmeh
|
|
95
|
+
- [docs] Fix `isExpanded` type in tree view docs (#19092) @mellis481
|
|
96
|
+
|
|
97
|
+
### Core
|
|
98
|
+
|
|
99
|
+
- [code-infra] Disable Netlify cache plugin (#19950) @Janpot
|
|
100
|
+
- [code-infra] Lint json through eslint (#19890) @Janpot
|
|
101
|
+
- [docs-infra] Use published netlify cache plugin package (#19929) @brijeshb42
|
|
102
|
+
|
|
8
103
|
## 8.14.0
|
|
9
104
|
|
|
10
105
|
_Oct 9, 2025_
|
|
@@ -32,7 +32,7 @@ const configuration = {
|
|
|
32
32
|
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
|
-
const releaseInfo = "
|
|
35
|
+
const releaseInfo = "MTc2MDU3MjgwMDAwMA==";
|
|
36
36
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
37
37
|
packageName: "x-data-grid-pro",
|
|
38
38
|
releaseInfo: releaseInfo
|
|
@@ -25,7 +25,7 @@ const configuration = {
|
|
|
25
25
|
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
const releaseInfo = "
|
|
28
|
+
const releaseInfo = "MTc2MDU3MjgwMDAwMA==";
|
|
29
29
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
30
30
|
packageName: "x-data-grid-pro",
|
|
31
31
|
releaseInfo: releaseInfo
|
|
@@ -27,12 +27,12 @@ export const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
27
27
|
return null;
|
|
28
28
|
}, [apiRef, nestedDataManager]);
|
|
29
29
|
const handleEditRow = React.useCallback((params, updatedRow) => {
|
|
30
|
-
const groupKeys = getGroupKeys(gridRowTreeSelector(apiRef), params.rowId);
|
|
31
|
-
apiRef.current.updateNestedRows([updatedRow], groupKeys);
|
|
32
30
|
if (updatedRow && !isDeepEqual(updatedRow, params.previousRow)) {
|
|
33
31
|
// Reset the outdated cache, only if the row is _actually_ updated
|
|
34
32
|
apiRef.current.dataSource.cache.clear();
|
|
35
33
|
}
|
|
34
|
+
const groupKeys = getGroupKeys(gridRowTreeSelector(apiRef), params.rowId);
|
|
35
|
+
apiRef.current.updateNestedRows([updatedRow], groupKeys);
|
|
36
36
|
}, [apiRef]);
|
|
37
37
|
const {
|
|
38
38
|
api,
|
package/esm/index.js
CHANGED
package/esm/internals/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ export { useGridInfiniteLoadingIntersection } from "../hooks/features/serverSide
|
|
|
25
25
|
export { dataSourceStateInitializer } from "../hooks/features/dataSource/useGridDataSourcePro.js";
|
|
26
26
|
export { useGridDataSourceBasePro } from "../hooks/features/dataSource/useGridDataSourceBasePro.js";
|
|
27
27
|
export { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
|
|
28
|
-
export { getGroupKeys } from "../hooks/features/dataSource/utils.js";
|
|
29
28
|
export type { GridExperimentalProFeatures, DataGridProPropsWithoutDefaultValue, DataGridProPropsWithDefaultValue } from "../models/dataGridProProps.js";
|
|
30
29
|
export type { GridProSlotProps } from "../models/gridProSlotProps.js";
|
|
31
30
|
export { createRowTree } from "../utils/tree/createRowTree.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -28,7 +28,6 @@ export { useGridInfiniteLoadingIntersection } from "../hooks/features/serverSide
|
|
|
28
28
|
export { dataSourceStateInitializer } from "../hooks/features/dataSource/useGridDataSourcePro.js";
|
|
29
29
|
export { useGridDataSourceBasePro } from "../hooks/features/dataSource/useGridDataSourceBasePro.js";
|
|
30
30
|
export { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
|
|
31
|
-
export { getGroupKeys } from "../hooks/features/dataSource/utils.js";
|
|
32
31
|
export { createRowTree } from "../utils/tree/createRowTree.js";
|
|
33
32
|
export { updateRowTree } from "../utils/tree/updateRowTree.js";
|
|
34
33
|
export { sortRowTree } from "../utils/tree/sortRowTree.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { GridTreePathDuplicateHandler, RowTreeBuilderGroupingCriterion } from "./models.js";
|
|
4
4
|
import { DataGridProProps } from "../../models/dataGridProProps.js";
|
|
5
5
|
interface InsertDataRowInTreeParams {
|
|
@@ -32,12 +32,6 @@ interface InsertDataRowInTreeParams {
|
|
|
32
32
|
* - `treeDepths[nodeDepth] = treeDepth[nodeDepth] + 1` => valid
|
|
33
33
|
*/
|
|
34
34
|
treeDepths: GridTreeDepths;
|
|
35
|
-
/**
|
|
36
|
-
* Object tracking the action performed on each group.
|
|
37
|
-
* Used to decide which groups to refresh on sorting, filtering, aggregation, ...
|
|
38
|
-
* If not defined, then the tracking will be skipped.
|
|
39
|
-
*/
|
|
40
|
-
updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
|
|
41
35
|
/**
|
|
42
36
|
* Callback fired when trying to insert a data row for a path already populated by another data row.
|
|
43
37
|
*/
|
|
@@ -57,7 +51,6 @@ interface InsertDataRowInTreeParams {
|
|
|
57
51
|
export declare const insertDataRowInTree: ({
|
|
58
52
|
id,
|
|
59
53
|
path,
|
|
60
|
-
updatedGroupsManager,
|
|
61
54
|
previousTree,
|
|
62
55
|
tree,
|
|
63
56
|
treeDepths,
|
|
@@ -9,7 +9,6 @@ import { updateGroupDefaultExpansion, checkGroupChildrenExpansion, getGroupRowId
|
|
|
9
9
|
export const insertDataRowInTree = ({
|
|
10
10
|
id,
|
|
11
11
|
path,
|
|
12
|
-
updatedGroupsManager,
|
|
13
12
|
previousTree,
|
|
14
13
|
tree,
|
|
15
14
|
treeDepths,
|
|
@@ -52,7 +51,7 @@ export const insertDataRowInTree = ({
|
|
|
52
51
|
childrenExpanded: false,
|
|
53
52
|
serverChildrenCount
|
|
54
53
|
};
|
|
55
|
-
const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault
|
|
54
|
+
const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault);
|
|
56
55
|
if (shouldFetchChildren) {
|
|
57
56
|
groupsToFetch?.add(id);
|
|
58
57
|
}
|
|
@@ -65,7 +64,6 @@ export const insertDataRowInTree = ({
|
|
|
65
64
|
groupingKey: key
|
|
66
65
|
};
|
|
67
66
|
}
|
|
68
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
69
67
|
insertNodeInTree(node, tree, treeDepths, previousTree);
|
|
70
68
|
} else {
|
|
71
69
|
const existingNodeWithPartialPath = tree[existingNodeIdWithPartialPath];
|
|
@@ -73,8 +71,6 @@ export const insertDataRowInTree = ({
|
|
|
73
71
|
// If we already have an auto-generated group matching the partial path,
|
|
74
72
|
// We replace it with the node from of data row passed to `insertNodeInTree`
|
|
75
73
|
if (existingNodeWithPartialPath.type === 'group' && existingNodeWithPartialPath.isAutoGenerated) {
|
|
76
|
-
updatedGroupsManager?.addAction(parentNodeId, 'removeChildren');
|
|
77
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
78
74
|
updateGroupNodeIdAndAutoGenerated({
|
|
79
75
|
tree,
|
|
80
76
|
previousTree,
|
|
@@ -111,7 +107,6 @@ export const insertDataRowInTree = ({
|
|
|
111
107
|
childrenFromPath: {},
|
|
112
108
|
childrenExpanded: false
|
|
113
109
|
};
|
|
114
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
115
110
|
insertNodeInTree(updateGroupDefaultExpansion(autoGeneratedGroupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
|
|
116
111
|
parentNodeId = nodeId;
|
|
117
112
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
interface RemoveDataRowFromTreeParams {
|
|
4
4
|
/**
|
|
5
5
|
* ID of the data row to remove from the tree.
|
|
@@ -22,12 +22,6 @@ interface RemoveDataRowFromTreeParams {
|
|
|
22
22
|
* - `treeDepths[nodeDepth] = treeDepth[nodeDepth] + 1` => valid
|
|
23
23
|
*/
|
|
24
24
|
treeDepths: GridTreeDepths;
|
|
25
|
-
/**
|
|
26
|
-
* Object tracking the action performed on each group.
|
|
27
|
-
* Used to decide which groups to refresh on sorting, filtering, aggregation, ...
|
|
28
|
-
* If not defined, then the tracking will be skipped.
|
|
29
|
-
*/
|
|
30
|
-
updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
|
|
31
25
|
groupingName: string;
|
|
32
26
|
}
|
|
33
27
|
/**
|
|
@@ -41,7 +35,6 @@ export declare const removeDataRowFromTree: ({
|
|
|
41
35
|
id,
|
|
42
36
|
tree,
|
|
43
37
|
treeDepths,
|
|
44
|
-
updatedGroupsManager,
|
|
45
38
|
groupingName
|
|
46
39
|
}: RemoveDataRowFromTreeParams) => void;
|
|
47
40
|
export {};
|
|
@@ -23,8 +23,7 @@ const removeNode = ({
|
|
|
23
23
|
const removeNodeAndCleanParent = ({
|
|
24
24
|
node,
|
|
25
25
|
tree,
|
|
26
|
-
treeDepths
|
|
27
|
-
updatedGroupsManager
|
|
26
|
+
treeDepths
|
|
28
27
|
}) => {
|
|
29
28
|
removeNode({
|
|
30
29
|
node,
|
|
@@ -32,7 +31,6 @@ const removeNodeAndCleanParent = ({
|
|
|
32
31
|
treeDepths
|
|
33
32
|
});
|
|
34
33
|
const parentNode = tree[node.parent];
|
|
35
|
-
updatedGroupsManager?.addAction(parentNode.id, 'removeChildren');
|
|
36
34
|
const shouldDeleteGroup = parentNode.id !== GRID_ROOT_GROUP_ID && parentNode.children.length === 0;
|
|
37
35
|
if (shouldDeleteGroup) {
|
|
38
36
|
if (parentNode.isAutoGenerated) {
|
|
@@ -55,11 +53,8 @@ const removeNodeAndCleanParent = ({
|
|
|
55
53
|
const replaceDataGroupWithAutoGeneratedGroup = ({
|
|
56
54
|
node,
|
|
57
55
|
tree,
|
|
58
|
-
treeDepths
|
|
59
|
-
updatedGroupsManager
|
|
56
|
+
treeDepths
|
|
60
57
|
}) => {
|
|
61
|
-
updatedGroupsManager?.addAction(node.parent, 'removeChildren');
|
|
62
|
-
updatedGroupsManager?.addAction(node.parent, 'insertChildren');
|
|
63
58
|
updateGroupNodeIdAndAutoGenerated({
|
|
64
59
|
previousTree: null,
|
|
65
60
|
tree,
|
|
@@ -86,7 +81,6 @@ export const removeDataRowFromTree = ({
|
|
|
86
81
|
id,
|
|
87
82
|
tree,
|
|
88
83
|
treeDepths,
|
|
89
|
-
updatedGroupsManager,
|
|
90
84
|
groupingName
|
|
91
85
|
}) => {
|
|
92
86
|
const node = tree[id];
|
|
@@ -94,15 +88,13 @@ export const removeDataRowFromTree = ({
|
|
|
94
88
|
replaceDataGroupWithAutoGeneratedGroup({
|
|
95
89
|
node,
|
|
96
90
|
tree,
|
|
97
|
-
treeDepths
|
|
98
|
-
updatedGroupsManager
|
|
91
|
+
treeDepths
|
|
99
92
|
});
|
|
100
93
|
} else if (groupingName === TreeDataStrategy.Default || groupingName === RowGroupingStrategy.Default) {
|
|
101
94
|
removeNodeAndCleanParent({
|
|
102
95
|
node,
|
|
103
96
|
tree,
|
|
104
|
-
treeDepths
|
|
105
|
-
updatedGroupsManager
|
|
97
|
+
treeDepths
|
|
106
98
|
});
|
|
107
99
|
} else {
|
|
108
100
|
removeNode({
|
|
@@ -4,11 +4,10 @@ import { getTreeNodeDescendants } from '@mui/x-data-grid/internals';
|
|
|
4
4
|
import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
|
|
5
5
|
import { insertDataRowInTree } from "./insertDataRowInTree.js";
|
|
6
6
|
import { removeDataRowFromTree } from "./removeDataRowFromTree.js";
|
|
7
|
-
import {
|
|
7
|
+
import { getNodePathInTree } from "./utils.js";
|
|
8
8
|
export const updateRowTree = params => {
|
|
9
9
|
const tree = _extends({}, params.previousTree);
|
|
10
10
|
const treeDepths = _extends({}, params.previousTreeDepth);
|
|
11
|
-
const updatedGroupsManager = createUpdatedGroupsManager();
|
|
12
11
|
const groupsToFetch = params.previousGroupsToFetch ? new Set([...params.previousGroupsToFetch]) : new Set([]);
|
|
13
12
|
for (let i = 0; i < params.nodes.inserted.length; i += 1) {
|
|
14
13
|
const {
|
|
@@ -20,7 +19,6 @@ export const updateRowTree = params => {
|
|
|
20
19
|
previousTree: params.previousTree,
|
|
21
20
|
tree,
|
|
22
21
|
treeDepths,
|
|
23
|
-
updatedGroupsManager,
|
|
24
22
|
id,
|
|
25
23
|
path,
|
|
26
24
|
serverChildrenCount,
|
|
@@ -36,7 +34,6 @@ export const updateRowTree = params => {
|
|
|
36
34
|
removeDataRowFromTree({
|
|
37
35
|
tree,
|
|
38
36
|
treeDepths,
|
|
39
|
-
updatedGroupsManager,
|
|
40
37
|
id: nodeId,
|
|
41
38
|
groupingName: params.groupingName
|
|
42
39
|
});
|
|
@@ -56,7 +53,6 @@ export const updateRowTree = params => {
|
|
|
56
53
|
removeDataRowFromTree({
|
|
57
54
|
tree,
|
|
58
55
|
treeDepths,
|
|
59
|
-
updatedGroupsManager,
|
|
60
56
|
id,
|
|
61
57
|
groupingName: params.groupingName
|
|
62
58
|
});
|
|
@@ -64,7 +60,6 @@ export const updateRowTree = params => {
|
|
|
64
60
|
previousTree: params.previousTree,
|
|
65
61
|
tree,
|
|
66
62
|
treeDepths,
|
|
67
|
-
updatedGroupsManager,
|
|
68
63
|
id,
|
|
69
64
|
path,
|
|
70
65
|
serverChildrenCount,
|
|
@@ -74,8 +69,6 @@ export const updateRowTree = params => {
|
|
|
74
69
|
groupsToFetch,
|
|
75
70
|
maxDepth: params.maxDepth
|
|
76
71
|
});
|
|
77
|
-
} else {
|
|
78
|
-
updatedGroupsManager?.addAction(tree[id].parent, 'modifyChildren');
|
|
79
72
|
}
|
|
80
73
|
}
|
|
81
74
|
|
|
@@ -86,7 +79,6 @@ export const updateRowTree = params => {
|
|
|
86
79
|
treeDepths,
|
|
87
80
|
groupingName: params.groupingName,
|
|
88
81
|
dataRowIds,
|
|
89
|
-
updatedGroupsManager,
|
|
90
82
|
groupsToFetch: Array.from(groupsToFetch)
|
|
91
83
|
};
|
|
92
84
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridFilterState, GridGroupNode, GridRowId, GridRowTreeConfig, GridRowsState, GridTreeNode } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { RowTreeBuilderGroupingCriterion } from "./models.js";
|
|
4
4
|
import { DataGridProProps } from "../../models/dataGridProProps.js";
|
|
5
5
|
export declare const getGroupRowIdFromPath: (path: RowTreeBuilderGroupingCriterion[]) => string;
|
|
@@ -44,7 +44,6 @@ export declare const updateGroupNodeIdAndAutoGenerated: ({
|
|
|
44
44
|
tree: GridRowTreeConfig;
|
|
45
45
|
treeDepths: GridTreeDepths;
|
|
46
46
|
}) => void;
|
|
47
|
-
export declare const createUpdatedGroupsManager: () => GridRowTreeUpdatedGroupsManager;
|
|
48
47
|
export declare const getVisibleRowsLookup: ({
|
|
49
48
|
tree,
|
|
50
49
|
filteredRowsLookup
|
package/esm/utils/tree/utils.js
CHANGED
|
@@ -151,15 +151,6 @@ export const updateGroupNodeIdAndAutoGenerated = ({
|
|
|
151
151
|
const groupNode = _extends({}, node, updatedNode);
|
|
152
152
|
insertNodeInTree(groupNode, tree, treeDepths, previousTree);
|
|
153
153
|
};
|
|
154
|
-
export const createUpdatedGroupsManager = () => ({
|
|
155
|
-
value: {},
|
|
156
|
-
addAction(groupId, action) {
|
|
157
|
-
if (!this.value[groupId]) {
|
|
158
|
-
this.value[groupId] = {};
|
|
159
|
-
}
|
|
160
|
-
this.value[groupId][action] = true;
|
|
161
|
-
}
|
|
162
|
-
});
|
|
163
154
|
export const getVisibleRowsLookup = ({
|
|
164
155
|
tree,
|
|
165
156
|
filteredRowsLookup
|
|
@@ -34,12 +34,12 @@ const useGridDataSourceBasePro = (apiRef, props, options = {}) => {
|
|
|
34
34
|
return null;
|
|
35
35
|
}, [apiRef, nestedDataManager]);
|
|
36
36
|
const handleEditRow = React.useCallback((params, updatedRow) => {
|
|
37
|
-
const groupKeys = (0, _utils.getGroupKeys)((0, _xDataGrid.gridRowTreeSelector)(apiRef), params.rowId);
|
|
38
|
-
apiRef.current.updateNestedRows([updatedRow], groupKeys);
|
|
39
37
|
if (updatedRow && !(0, _isDeepEqual.isDeepEqual)(updatedRow, params.previousRow)) {
|
|
40
38
|
// Reset the outdated cache, only if the row is _actually_ updated
|
|
41
39
|
apiRef.current.dataSource.cache.clear();
|
|
42
40
|
}
|
|
41
|
+
const groupKeys = (0, _utils.getGroupKeys)((0, _xDataGrid.gridRowTreeSelector)(apiRef), params.rowId);
|
|
42
|
+
apiRef.current.updateNestedRows([updatedRow], groupKeys);
|
|
43
43
|
}, [apiRef]);
|
|
44
44
|
const {
|
|
45
45
|
api,
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ export { useGridInfiniteLoadingIntersection } from "../hooks/features/serverSide
|
|
|
25
25
|
export { dataSourceStateInitializer } from "../hooks/features/dataSource/useGridDataSourcePro.js";
|
|
26
26
|
export { useGridDataSourceBasePro } from "../hooks/features/dataSource/useGridDataSourceBasePro.js";
|
|
27
27
|
export { gridDataSourceErrorSelector, gridDataSourceLoadingIdSelector } from "../hooks/features/dataSource/gridDataSourceSelector.js";
|
|
28
|
-
export { getGroupKeys } from "../hooks/features/dataSource/utils.js";
|
|
29
28
|
export type { GridExperimentalProFeatures, DataGridProPropsWithoutDefaultValue, DataGridProPropsWithDefaultValue } from "../models/dataGridProProps.js";
|
|
30
29
|
export type { GridProSlotProps } from "../models/gridProSlotProps.js";
|
|
31
30
|
export { createRowTree } from "../utils/tree/createRowTree.js";
|
package/internals/index.js
CHANGED
|
@@ -37,7 +37,6 @@ var _exportNames = {
|
|
|
37
37
|
useGridDataSourceBasePro: true,
|
|
38
38
|
gridDataSourceErrorSelector: true,
|
|
39
39
|
gridDataSourceLoadingIdSelector: true,
|
|
40
|
-
getGroupKeys: true,
|
|
41
40
|
createRowTree: true,
|
|
42
41
|
updateRowTree: true,
|
|
43
42
|
sortRowTree: true,
|
|
@@ -97,22 +96,16 @@ Object.defineProperty(exports, "detailPanelStateInitializer", {
|
|
|
97
96
|
return _useGridDetailPanel.detailPanelStateInitializer;
|
|
98
97
|
}
|
|
99
98
|
});
|
|
100
|
-
Object.defineProperty(exports, "getGroupKeys", {
|
|
101
|
-
enumerable: true,
|
|
102
|
-
get: function () {
|
|
103
|
-
return _utils.getGroupKeys;
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
99
|
Object.defineProperty(exports, "getParentPath", {
|
|
107
100
|
enumerable: true,
|
|
108
101
|
get: function () {
|
|
109
|
-
return
|
|
102
|
+
return _utils2.getParentPath;
|
|
110
103
|
}
|
|
111
104
|
});
|
|
112
105
|
Object.defineProperty(exports, "getVisibleRowsLookup", {
|
|
113
106
|
enumerable: true,
|
|
114
107
|
get: function () {
|
|
115
|
-
return
|
|
108
|
+
return _utils.getVisibleRowsLookup;
|
|
116
109
|
}
|
|
117
110
|
});
|
|
118
111
|
Object.defineProperty(exports, "gridDataSourceErrorSelector", {
|
|
@@ -130,13 +123,13 @@ Object.defineProperty(exports, "gridDataSourceLoadingIdSelector", {
|
|
|
130
123
|
Object.defineProperty(exports, "insertNodeInTree", {
|
|
131
124
|
enumerable: true,
|
|
132
125
|
get: function () {
|
|
133
|
-
return
|
|
126
|
+
return _utils.insertNodeInTree;
|
|
134
127
|
}
|
|
135
128
|
});
|
|
136
129
|
Object.defineProperty(exports, "removeNodeFromTree", {
|
|
137
130
|
enumerable: true,
|
|
138
131
|
get: function () {
|
|
139
|
-
return
|
|
132
|
+
return _utils.removeNodeFromTree;
|
|
140
133
|
}
|
|
141
134
|
});
|
|
142
135
|
Object.defineProperty(exports, "rowPinningStateInitializer", {
|
|
@@ -154,13 +147,13 @@ Object.defineProperty(exports, "rowReorderStateInitializer", {
|
|
|
154
147
|
Object.defineProperty(exports, "skipFiltering", {
|
|
155
148
|
enumerable: true,
|
|
156
149
|
get: function () {
|
|
157
|
-
return
|
|
150
|
+
return _utils2.skipFiltering;
|
|
158
151
|
}
|
|
159
152
|
});
|
|
160
153
|
Object.defineProperty(exports, "skipSorting", {
|
|
161
154
|
enumerable: true,
|
|
162
155
|
get: function () {
|
|
163
|
-
return
|
|
156
|
+
return _utils2.skipSorting;
|
|
164
157
|
}
|
|
165
158
|
});
|
|
166
159
|
Object.defineProperty(exports, "sortRowTree", {
|
|
@@ -338,12 +331,11 @@ var _useGridInfiniteLoadingIntersection = require("../hooks/features/serverSideL
|
|
|
338
331
|
var _useGridDataSourcePro = require("../hooks/features/dataSource/useGridDataSourcePro");
|
|
339
332
|
var _useGridDataSourceBasePro = require("../hooks/features/dataSource/useGridDataSourceBasePro");
|
|
340
333
|
var _gridDataSourceSelector = require("../hooks/features/dataSource/gridDataSourceSelector");
|
|
341
|
-
var _utils = require("../hooks/features/dataSource/utils");
|
|
342
334
|
var _createRowTree = require("../utils/tree/createRowTree");
|
|
343
335
|
var _updateRowTree = require("../utils/tree/updateRowTree");
|
|
344
336
|
var _sortRowTree = require("../utils/tree/sortRowTree");
|
|
345
|
-
var
|
|
346
|
-
var
|
|
337
|
+
var _utils = require("../utils/tree/utils");
|
|
338
|
+
var _utils2 = require("../hooks/features/serverSideTreeData/utils");
|
|
347
339
|
var _propValidation = require("./propValidation");
|
|
348
340
|
Object.keys(_propValidation).forEach(function (key) {
|
|
349
341
|
if (key === "default" || key === "__esModule") return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "8.14.
|
|
3
|
+
"version": "8.14.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"@mui/utils": "^7.3.3",
|
|
38
38
|
"clsx": "^2.1.1",
|
|
39
39
|
"prop-types": "^15.8.1",
|
|
40
|
-
"@mui/x-data-grid": "8.14.
|
|
41
|
-
"@mui/x-
|
|
42
|
-
"@mui/x-
|
|
40
|
+
"@mui/x-data-grid": "8.14.1",
|
|
41
|
+
"@mui/x-license": "8.14.1",
|
|
42
|
+
"@mui/x-internals": "8.14.0"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"@emotion/react": "^11.9.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { GridTreePathDuplicateHandler, RowTreeBuilderGroupingCriterion } from "./models.js";
|
|
4
4
|
import { DataGridProProps } from "../../models/dataGridProProps.js";
|
|
5
5
|
interface InsertDataRowInTreeParams {
|
|
@@ -32,12 +32,6 @@ interface InsertDataRowInTreeParams {
|
|
|
32
32
|
* - `treeDepths[nodeDepth] = treeDepth[nodeDepth] + 1` => valid
|
|
33
33
|
*/
|
|
34
34
|
treeDepths: GridTreeDepths;
|
|
35
|
-
/**
|
|
36
|
-
* Object tracking the action performed on each group.
|
|
37
|
-
* Used to decide which groups to refresh on sorting, filtering, aggregation, ...
|
|
38
|
-
* If not defined, then the tracking will be skipped.
|
|
39
|
-
*/
|
|
40
|
-
updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
|
|
41
35
|
/**
|
|
42
36
|
* Callback fired when trying to insert a data row for a path already populated by another data row.
|
|
43
37
|
*/
|
|
@@ -57,7 +51,6 @@ interface InsertDataRowInTreeParams {
|
|
|
57
51
|
export declare const insertDataRowInTree: ({
|
|
58
52
|
id,
|
|
59
53
|
path,
|
|
60
|
-
updatedGroupsManager,
|
|
61
54
|
previousTree,
|
|
62
55
|
tree,
|
|
63
56
|
treeDepths,
|
|
@@ -15,7 +15,6 @@ var _utils = require("./utils");
|
|
|
15
15
|
const insertDataRowInTree = ({
|
|
16
16
|
id,
|
|
17
17
|
path,
|
|
18
|
-
updatedGroupsManager,
|
|
19
18
|
previousTree,
|
|
20
19
|
tree,
|
|
21
20
|
treeDepths,
|
|
@@ -58,7 +57,7 @@ const insertDataRowInTree = ({
|
|
|
58
57
|
childrenExpanded: false,
|
|
59
58
|
serverChildrenCount
|
|
60
59
|
};
|
|
61
|
-
const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault
|
|
60
|
+
const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault);
|
|
62
61
|
if (shouldFetchChildren) {
|
|
63
62
|
groupsToFetch?.add(id);
|
|
64
63
|
}
|
|
@@ -71,7 +70,6 @@ const insertDataRowInTree = ({
|
|
|
71
70
|
groupingKey: key
|
|
72
71
|
};
|
|
73
72
|
}
|
|
74
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
75
73
|
(0, _utils.insertNodeInTree)(node, tree, treeDepths, previousTree);
|
|
76
74
|
} else {
|
|
77
75
|
const existingNodeWithPartialPath = tree[existingNodeIdWithPartialPath];
|
|
@@ -79,8 +77,6 @@ const insertDataRowInTree = ({
|
|
|
79
77
|
// If we already have an auto-generated group matching the partial path,
|
|
80
78
|
// We replace it with the node from of data row passed to `insertNodeInTree`
|
|
81
79
|
if (existingNodeWithPartialPath.type === 'group' && existingNodeWithPartialPath.isAutoGenerated) {
|
|
82
|
-
updatedGroupsManager?.addAction(parentNodeId, 'removeChildren');
|
|
83
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
84
80
|
(0, _utils.updateGroupNodeIdAndAutoGenerated)({
|
|
85
81
|
tree,
|
|
86
82
|
previousTree,
|
|
@@ -117,7 +113,6 @@ const insertDataRowInTree = ({
|
|
|
117
113
|
childrenFromPath: {},
|
|
118
114
|
childrenExpanded: false
|
|
119
115
|
};
|
|
120
|
-
updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
|
|
121
116
|
(0, _utils.insertNodeInTree)((0, _utils.updateGroupDefaultExpansion)(autoGeneratedGroupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
|
|
122
117
|
parentNodeId = nodeId;
|
|
123
118
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
interface RemoveDataRowFromTreeParams {
|
|
4
4
|
/**
|
|
5
5
|
* ID of the data row to remove from the tree.
|
|
@@ -22,12 +22,6 @@ interface RemoveDataRowFromTreeParams {
|
|
|
22
22
|
* - `treeDepths[nodeDepth] = treeDepth[nodeDepth] + 1` => valid
|
|
23
23
|
*/
|
|
24
24
|
treeDepths: GridTreeDepths;
|
|
25
|
-
/**
|
|
26
|
-
* Object tracking the action performed on each group.
|
|
27
|
-
* Used to decide which groups to refresh on sorting, filtering, aggregation, ...
|
|
28
|
-
* If not defined, then the tracking will be skipped.
|
|
29
|
-
*/
|
|
30
|
-
updatedGroupsManager?: GridRowTreeUpdatedGroupsManager;
|
|
31
25
|
groupingName: string;
|
|
32
26
|
}
|
|
33
27
|
/**
|
|
@@ -41,7 +35,6 @@ export declare const removeDataRowFromTree: ({
|
|
|
41
35
|
id,
|
|
42
36
|
tree,
|
|
43
37
|
treeDepths,
|
|
44
|
-
updatedGroupsManager,
|
|
45
38
|
groupingName
|
|
46
39
|
}: RemoveDataRowFromTreeParams) => void;
|
|
47
40
|
export {};
|
|
@@ -29,8 +29,7 @@ const removeNode = ({
|
|
|
29
29
|
const removeNodeAndCleanParent = ({
|
|
30
30
|
node,
|
|
31
31
|
tree,
|
|
32
|
-
treeDepths
|
|
33
|
-
updatedGroupsManager
|
|
32
|
+
treeDepths
|
|
34
33
|
}) => {
|
|
35
34
|
removeNode({
|
|
36
35
|
node,
|
|
@@ -38,7 +37,6 @@ const removeNodeAndCleanParent = ({
|
|
|
38
37
|
treeDepths
|
|
39
38
|
});
|
|
40
39
|
const parentNode = tree[node.parent];
|
|
41
|
-
updatedGroupsManager?.addAction(parentNode.id, 'removeChildren');
|
|
42
40
|
const shouldDeleteGroup = parentNode.id !== _xDataGrid.GRID_ROOT_GROUP_ID && parentNode.children.length === 0;
|
|
43
41
|
if (shouldDeleteGroup) {
|
|
44
42
|
if (parentNode.isAutoGenerated) {
|
|
@@ -61,11 +59,8 @@ const removeNodeAndCleanParent = ({
|
|
|
61
59
|
const replaceDataGroupWithAutoGeneratedGroup = ({
|
|
62
60
|
node,
|
|
63
61
|
tree,
|
|
64
|
-
treeDepths
|
|
65
|
-
updatedGroupsManager
|
|
62
|
+
treeDepths
|
|
66
63
|
}) => {
|
|
67
|
-
updatedGroupsManager?.addAction(node.parent, 'removeChildren');
|
|
68
|
-
updatedGroupsManager?.addAction(node.parent, 'insertChildren');
|
|
69
64
|
(0, _utils.updateGroupNodeIdAndAutoGenerated)({
|
|
70
65
|
previousTree: null,
|
|
71
66
|
tree,
|
|
@@ -92,7 +87,6 @@ const removeDataRowFromTree = ({
|
|
|
92
87
|
id,
|
|
93
88
|
tree,
|
|
94
89
|
treeDepths,
|
|
95
|
-
updatedGroupsManager,
|
|
96
90
|
groupingName
|
|
97
91
|
}) => {
|
|
98
92
|
const node = tree[id];
|
|
@@ -100,15 +94,13 @@ const removeDataRowFromTree = ({
|
|
|
100
94
|
replaceDataGroupWithAutoGeneratedGroup({
|
|
101
95
|
node,
|
|
102
96
|
tree,
|
|
103
|
-
treeDepths
|
|
104
|
-
updatedGroupsManager
|
|
97
|
+
treeDepths
|
|
105
98
|
});
|
|
106
99
|
} else if (groupingName === _gridTreeDataUtils.TreeDataStrategy.Default || groupingName === _internals.RowGroupingStrategy.Default) {
|
|
107
100
|
removeNodeAndCleanParent({
|
|
108
101
|
node,
|
|
109
102
|
tree,
|
|
110
|
-
treeDepths
|
|
111
|
-
updatedGroupsManager
|
|
103
|
+
treeDepths
|
|
112
104
|
});
|
|
113
105
|
} else {
|
|
114
106
|
removeNode({
|
|
@@ -15,7 +15,6 @@ var _utils = require("./utils");
|
|
|
15
15
|
const updateRowTree = params => {
|
|
16
16
|
const tree = (0, _extends2.default)({}, params.previousTree);
|
|
17
17
|
const treeDepths = (0, _extends2.default)({}, params.previousTreeDepth);
|
|
18
|
-
const updatedGroupsManager = (0, _utils.createUpdatedGroupsManager)();
|
|
19
18
|
const groupsToFetch = params.previousGroupsToFetch ? new Set([...params.previousGroupsToFetch]) : new Set([]);
|
|
20
19
|
for (let i = 0; i < params.nodes.inserted.length; i += 1) {
|
|
21
20
|
const {
|
|
@@ -27,7 +26,6 @@ const updateRowTree = params => {
|
|
|
27
26
|
previousTree: params.previousTree,
|
|
28
27
|
tree,
|
|
29
28
|
treeDepths,
|
|
30
|
-
updatedGroupsManager,
|
|
31
29
|
id,
|
|
32
30
|
path,
|
|
33
31
|
serverChildrenCount,
|
|
@@ -43,7 +41,6 @@ const updateRowTree = params => {
|
|
|
43
41
|
(0, _removeDataRowFromTree.removeDataRowFromTree)({
|
|
44
42
|
tree,
|
|
45
43
|
treeDepths,
|
|
46
|
-
updatedGroupsManager,
|
|
47
44
|
id: nodeId,
|
|
48
45
|
groupingName: params.groupingName
|
|
49
46
|
});
|
|
@@ -63,7 +60,6 @@ const updateRowTree = params => {
|
|
|
63
60
|
(0, _removeDataRowFromTree.removeDataRowFromTree)({
|
|
64
61
|
tree,
|
|
65
62
|
treeDepths,
|
|
66
|
-
updatedGroupsManager,
|
|
67
63
|
id,
|
|
68
64
|
groupingName: params.groupingName
|
|
69
65
|
});
|
|
@@ -71,7 +67,6 @@ const updateRowTree = params => {
|
|
|
71
67
|
previousTree: params.previousTree,
|
|
72
68
|
tree,
|
|
73
69
|
treeDepths,
|
|
74
|
-
updatedGroupsManager,
|
|
75
70
|
id,
|
|
76
71
|
path,
|
|
77
72
|
serverChildrenCount,
|
|
@@ -81,8 +76,6 @@ const updateRowTree = params => {
|
|
|
81
76
|
groupsToFetch,
|
|
82
77
|
maxDepth: params.maxDepth
|
|
83
78
|
});
|
|
84
|
-
} else {
|
|
85
|
-
updatedGroupsManager?.addAction(tree[id].parent, 'modifyChildren');
|
|
86
79
|
}
|
|
87
80
|
}
|
|
88
81
|
|
|
@@ -93,7 +86,6 @@ const updateRowTree = params => {
|
|
|
93
86
|
treeDepths,
|
|
94
87
|
groupingName: params.groupingName,
|
|
95
88
|
dataRowIds,
|
|
96
|
-
updatedGroupsManager,
|
|
97
89
|
groupsToFetch: Array.from(groupsToFetch)
|
|
98
90
|
};
|
|
99
91
|
};
|
package/utils/tree/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GridFilterState, GridGroupNode, GridRowId, GridRowTreeConfig, GridRowsState, GridTreeNode } from '@mui/x-data-grid';
|
|
2
|
-
import { GridTreeDepths
|
|
2
|
+
import { GridTreeDepths } from '@mui/x-data-grid/internals';
|
|
3
3
|
import { RowTreeBuilderGroupingCriterion } from "./models.js";
|
|
4
4
|
import { DataGridProProps } from "../../models/dataGridProProps.js";
|
|
5
5
|
export declare const getGroupRowIdFromPath: (path: RowTreeBuilderGroupingCriterion[]) => string;
|
|
@@ -44,7 +44,6 @@ export declare const updateGroupNodeIdAndAutoGenerated: ({
|
|
|
44
44
|
tree: GridRowTreeConfig;
|
|
45
45
|
treeDepths: GridTreeDepths;
|
|
46
46
|
}) => void;
|
|
47
|
-
export declare const createUpdatedGroupsManager: () => GridRowTreeUpdatedGroupsManager;
|
|
48
47
|
export declare const getVisibleRowsLookup: ({
|
|
49
48
|
tree,
|
|
50
49
|
filteredRowsLookup
|
package/utils/tree/utils.js
CHANGED
|
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.updateGroupNodeIdAndAutoGenerated = exports.updateGroupDefaultExpansion = exports.removeNodeFromTree = exports.insertNodeInTree = exports.getVisibleRowsLookup = exports.getNodePathInTree = exports.getGroupRowIdFromPath = exports.
|
|
7
|
+
exports.updateGroupNodeIdAndAutoGenerated = exports.updateGroupDefaultExpansion = exports.removeNodeFromTree = exports.insertNodeInTree = exports.getVisibleRowsLookup = exports.getNodePathInTree = exports.getGroupRowIdFromPath = exports.checkGroupChildrenExpansion = void 0;
|
|
8
8
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
10
10
|
const getGroupRowIdFromPath = path => {
|
|
@@ -165,16 +165,6 @@ const updateGroupNodeIdAndAutoGenerated = ({
|
|
|
165
165
|
insertNodeInTree(groupNode, tree, treeDepths, previousTree);
|
|
166
166
|
};
|
|
167
167
|
exports.updateGroupNodeIdAndAutoGenerated = updateGroupNodeIdAndAutoGenerated;
|
|
168
|
-
const createUpdatedGroupsManager = () => ({
|
|
169
|
-
value: {},
|
|
170
|
-
addAction(groupId, action) {
|
|
171
|
-
if (!this.value[groupId]) {
|
|
172
|
-
this.value[groupId] = {};
|
|
173
|
-
}
|
|
174
|
-
this.value[groupId][action] = true;
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
exports.createUpdatedGroupsManager = createUpdatedGroupsManager;
|
|
178
168
|
const getVisibleRowsLookup = ({
|
|
179
169
|
tree,
|
|
180
170
|
filteredRowsLookup
|