@mui/x-data-grid-pro 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 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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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
  ![Grid x Charts](https://github.com/user-attachments/assets/0817c36f-f87f-4688-8f30-fa0db638ca8c)
162
332
 
163
- 👉 [🎥 Watch the full video](https://github.com/user-attachments/assets/28f1848e-dc85-4077-8756-a3e88afd4e54)
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
@@ -32,7 +32,7 @@ const configuration = {
32
32
  useFilterValueGetter: apiRef => apiRef.current.getRowValue
33
33
  }
34
34
  };
35
- const releaseInfo = "MTc1OTI3NjgwMDAwMA==";
35
+ const releaseInfo = "MTc1OTk2ODAwMDAwMA==";
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 = "MTc1OTI3NjgwMDAwMA==";
28
+ const releaseInfo = "MTc1OTk2ODAwMDAwMA==";
29
29
  const watermark = /*#__PURE__*/_jsx(Watermark, {
30
30
  packageName: "x-data-grid-pro",
31
31
  releaseInfo: releaseInfo
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.13.0
2
+ * @mui/x-data-grid-pro v8.14.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -9,6 +9,7 @@ interface CreateRowTreeParams {
9
9
  isGroupExpandedByDefault?: DataGridProProps['isGroupExpandedByDefault'];
10
10
  groupingName: string;
11
11
  onDuplicatePath?: GridTreePathDuplicateHandler;
12
+ maxDepth?: number;
12
13
  }
13
14
  /**
14
15
  * Transform a list of rows into a tree structure where each row references its parent and children.
@@ -24,7 +24,8 @@ export const createRowTree = params => {
24
24
  treeDepths,
25
25
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
26
26
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
27
- groupsToFetch
27
+ groupsToFetch,
28
+ maxDepth: params.maxDepth
28
29
  });
29
30
  }
30
31
  return {
@@ -46,6 +46,7 @@ interface InsertDataRowInTreeParams {
46
46
  defaultGroupingExpansionDepth: number;
47
47
  serverChildrenCount?: number;
48
48
  groupsToFetch?: Set<GridRowId>;
49
+ maxDepth?: number;
49
50
  }
50
51
  /**
51
52
  * Inserts a data row in a tree.
@@ -64,6 +65,7 @@ export declare const insertDataRowInTree: ({
64
65
  isGroupExpandedByDefault,
65
66
  defaultGroupingExpansionDepth,
66
67
  serverChildrenCount,
67
- groupsToFetch
68
+ groupsToFetch,
69
+ maxDepth
68
70
  }: InsertDataRowInTreeParams) => void;
69
71
  export {};
@@ -17,7 +17,8 @@ export const insertDataRowInTree = ({
17
17
  isGroupExpandedByDefault,
18
18
  defaultGroupingExpansionDepth,
19
19
  serverChildrenCount,
20
- groupsToFetch
20
+ groupsToFetch,
21
+ maxDepth
21
22
  }) => {
22
23
  let parentNodeId = GRID_ROOT_GROUP_ID;
23
24
  for (let depth = 0; depth < path.length; depth += 1) {
@@ -51,7 +52,7 @@ export const insertDataRowInTree = ({
51
52
  childrenExpanded: false,
52
53
  serverChildrenCount
53
54
  };
54
- const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
55
+ const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
55
56
  if (shouldFetchChildren) {
56
57
  groupsToFetch?.add(id);
57
58
  }
@@ -111,7 +112,7 @@ export const insertDataRowInTree = ({
111
112
  childrenExpanded: false
112
113
  };
113
114
  updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
114
- insertNodeInTree(updateGroupDefaultExpansion(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
115
+ insertNodeInTree(updateGroupDefaultExpansion(autoGeneratedGroupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
115
116
  parentNodeId = nodeId;
116
117
  }
117
118
  // For the intermediary steps of the path
@@ -133,7 +134,7 @@ export const insertDataRowInTree = ({
133
134
  childrenFromPath: {},
134
135
  childrenExpanded: false
135
136
  };
136
- tree[existingNodeIdWithPartialPath] = updateGroupDefaultExpansion(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
137
+ tree[existingNodeIdWithPartialPath] = updateGroupDefaultExpansion(groupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
137
138
  }
138
139
  parentNodeId = currentGroupNode.id;
139
140
  }
@@ -15,6 +15,7 @@ interface UpdateRowTreeParams {
15
15
  groupingName: string;
16
16
  onDuplicatePath?: GridTreePathDuplicateHandler;
17
17
  previousGroupsToFetch?: GridRowId[];
18
+ maxDepth?: number;
18
19
  }
19
20
  export declare const updateRowTree: (params: UpdateRowTreeParams) => GridRowTreeCreationValue;
20
21
  export {};
@@ -27,7 +27,8 @@ export const updateRowTree = params => {
27
27
  onDuplicatePath: params.onDuplicatePath,
28
28
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
29
29
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
30
- groupsToFetch
30
+ groupsToFetch,
31
+ maxDepth: params.maxDepth
31
32
  });
32
33
  }
33
34
  for (let i = 0; i < params.nodes.removed.length; i += 1) {
@@ -70,7 +71,8 @@ export const updateRowTree = params => {
70
71
  onDuplicatePath: params.onDuplicatePath,
71
72
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
72
73
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
73
- groupsToFetch
74
+ groupsToFetch,
75
+ maxDepth: params.maxDepth
74
76
  });
75
77
  } else {
76
78
  updatedGroupsManager?.addAction(tree[id].parent, 'modifyChildren');
@@ -10,8 +10,8 @@ export declare const getNodePathInTree: ({
10
10
  id: GridRowId;
11
11
  tree: GridRowTreeConfig;
12
12
  }) => RowTreeBuilderGroupingCriterion[];
13
- export declare const checkGroupChildrenExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => boolean;
14
- export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => GridGroupNode;
13
+ export declare const checkGroupChildrenExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, maxDepth?: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => boolean;
14
+ export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, maxDepth?: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => GridGroupNode;
15
15
  /**
16
16
  * Insert a node in the tree
17
17
  */
@@ -20,7 +20,10 @@ export const getNodePathInTree = ({
20
20
  path.reverse();
21
21
  return path;
22
22
  };
23
- export const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
23
+ export const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
24
+ if (maxDepth !== undefined && node.depth >= maxDepth) {
25
+ return false;
26
+ }
24
27
  let childrenExpanded;
25
28
  if (node.id === GRID_ROOT_GROUP_ID) {
26
29
  childrenExpanded = true;
@@ -31,8 +34,8 @@ export const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth,
31
34
  }
32
35
  return childrenExpanded;
33
36
  };
34
- export const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
35
- const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded);
37
+ export const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
38
+ const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded);
36
39
  node.childrenExpanded = childrenExpanded;
37
40
  return node;
38
41
  };
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.13.0
2
+ * @mui/x-data-grid-pro v8.14.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "8.13.0",
3
+ "version": "8.14.0",
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",
@@ -34,13 +34,12 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.28.4",
37
- "@mui/utils": "^7.3.2",
38
- "@types/format-util": "^1.0.4",
37
+ "@mui/utils": "^7.3.3",
39
38
  "clsx": "^2.1.1",
40
39
  "prop-types": "^15.8.1",
41
- "@mui/x-data-grid": "8.13.0",
42
- "@mui/x-internals": "8.12.0",
43
- "@mui/x-license": "8.12.0"
40
+ "@mui/x-data-grid": "8.14.0",
41
+ "@mui/x-internals": "8.14.0",
42
+ "@mui/x-license": "8.14.0"
44
43
  },
45
44
  "peerDependencies": {
46
45
  "@emotion/react": "^11.9.0",
@@ -9,6 +9,7 @@ interface CreateRowTreeParams {
9
9
  isGroupExpandedByDefault?: DataGridProProps['isGroupExpandedByDefault'];
10
10
  groupingName: string;
11
11
  onDuplicatePath?: GridTreePathDuplicateHandler;
12
+ maxDepth?: number;
12
13
  }
13
14
  /**
14
15
  * Transform a list of rows into a tree structure where each row references its parent and children.
@@ -30,7 +30,8 @@ const createRowTree = params => {
30
30
  treeDepths,
31
31
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
32
32
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
33
- groupsToFetch
33
+ groupsToFetch,
34
+ maxDepth: params.maxDepth
34
35
  });
35
36
  }
36
37
  return {
@@ -46,6 +46,7 @@ interface InsertDataRowInTreeParams {
46
46
  defaultGroupingExpansionDepth: number;
47
47
  serverChildrenCount?: number;
48
48
  groupsToFetch?: Set<GridRowId>;
49
+ maxDepth?: number;
49
50
  }
50
51
  /**
51
52
  * Inserts a data row in a tree.
@@ -64,6 +65,7 @@ export declare const insertDataRowInTree: ({
64
65
  isGroupExpandedByDefault,
65
66
  defaultGroupingExpansionDepth,
66
67
  serverChildrenCount,
67
- groupsToFetch
68
+ groupsToFetch,
69
+ maxDepth
68
70
  }: InsertDataRowInTreeParams) => void;
69
71
  export {};
@@ -23,7 +23,8 @@ const insertDataRowInTree = ({
23
23
  isGroupExpandedByDefault,
24
24
  defaultGroupingExpansionDepth,
25
25
  serverChildrenCount,
26
- groupsToFetch
26
+ groupsToFetch,
27
+ maxDepth
27
28
  }) => {
28
29
  let parentNodeId = _xDataGrid.GRID_ROOT_GROUP_ID;
29
30
  for (let depth = 0; depth < path.length; depth += 1) {
@@ -57,7 +58,7 @@ const insertDataRowInTree = ({
57
58
  childrenExpanded: false,
58
59
  serverChildrenCount
59
60
  };
60
- const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
61
+ const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
61
62
  if (shouldFetchChildren) {
62
63
  groupsToFetch?.add(id);
63
64
  }
@@ -117,7 +118,7 @@ const insertDataRowInTree = ({
117
118
  childrenExpanded: false
118
119
  };
119
120
  updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
120
- (0, _utils.insertNodeInTree)((0, _utils.updateGroupDefaultExpansion)(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
121
+ (0, _utils.insertNodeInTree)((0, _utils.updateGroupDefaultExpansion)(autoGeneratedGroupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
121
122
  parentNodeId = nodeId;
122
123
  }
123
124
  // For the intermediary steps of the path
@@ -139,7 +140,7 @@ const insertDataRowInTree = ({
139
140
  childrenFromPath: {},
140
141
  childrenExpanded: false
141
142
  };
142
- tree[existingNodeIdWithPartialPath] = (0, _utils.updateGroupDefaultExpansion)(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
143
+ tree[existingNodeIdWithPartialPath] = (0, _utils.updateGroupDefaultExpansion)(groupNode, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
143
144
  }
144
145
  parentNodeId = currentGroupNode.id;
145
146
  }
@@ -15,6 +15,7 @@ interface UpdateRowTreeParams {
15
15
  groupingName: string;
16
16
  onDuplicatePath?: GridTreePathDuplicateHandler;
17
17
  previousGroupsToFetch?: GridRowId[];
18
+ maxDepth?: number;
18
19
  }
19
20
  export declare const updateRowTree: (params: UpdateRowTreeParams) => GridRowTreeCreationValue;
20
21
  export {};
@@ -34,7 +34,8 @@ const updateRowTree = params => {
34
34
  onDuplicatePath: params.onDuplicatePath,
35
35
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
36
36
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
37
- groupsToFetch
37
+ groupsToFetch,
38
+ maxDepth: params.maxDepth
38
39
  });
39
40
  }
40
41
  for (let i = 0; i < params.nodes.removed.length; i += 1) {
@@ -77,7 +78,8 @@ const updateRowTree = params => {
77
78
  onDuplicatePath: params.onDuplicatePath,
78
79
  isGroupExpandedByDefault: params.isGroupExpandedByDefault,
79
80
  defaultGroupingExpansionDepth: params.defaultGroupingExpansionDepth,
80
- groupsToFetch
81
+ groupsToFetch,
82
+ maxDepth: params.maxDepth
81
83
  });
82
84
  } else {
83
85
  updatedGroupsManager?.addAction(tree[id].parent, 'modifyChildren');
@@ -10,8 +10,8 @@ export declare const getNodePathInTree: ({
10
10
  id: GridRowId;
11
11
  tree: GridRowTreeConfig;
12
12
  }) => RowTreeBuilderGroupingCriterion[];
13
- export declare const checkGroupChildrenExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => boolean;
14
- export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => GridGroupNode;
13
+ export declare const checkGroupChildrenExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, maxDepth?: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => boolean;
14
+ export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, maxDepth?: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"], prevChildrenExpanded?: boolean) => GridGroupNode;
15
15
  /**
16
16
  * Insert a node in the tree
17
17
  */
@@ -29,7 +29,10 @@ const getNodePathInTree = ({
29
29
  return path;
30
30
  };
31
31
  exports.getNodePathInTree = getNodePathInTree;
32
- const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
32
+ const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
33
+ if (maxDepth !== undefined && node.depth >= maxDepth) {
34
+ return false;
35
+ }
33
36
  let childrenExpanded;
34
37
  if (node.id === _xDataGrid.GRID_ROOT_GROUP_ID) {
35
38
  childrenExpanded = true;
@@ -41,8 +44,8 @@ const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGrou
41
44
  return childrenExpanded;
42
45
  };
43
46
  exports.checkGroupChildrenExpansion = checkGroupChildrenExpansion;
44
- const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
45
- const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded);
47
+ const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
48
+ const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, maxDepth, isGroupExpandedByDefault, prevChildrenExpanded);
46
49
  node.childrenExpanded = childrenExpanded;
47
50
  return node;
48
51
  };