@mui/x-data-grid-pro 8.12.1 → 8.13.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 CHANGED
@@ -5,6 +5,189 @@
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.13.1
9
+
10
+ _Oct 1, 2025_
11
+
12
+ - 🐛 Fix `@mui/x-charts-pro` failure on import due to missing `@mui/x-internals` release
13
+
14
+ ### Data Grid
15
+
16
+ #### `@mui/x-data-grid@8.13.1`
17
+
18
+ Internal changes.
19
+
20
+ #### `@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')
21
+
22
+ Same changes as in `@mui/x-data-grid@8.13.1`.
23
+
24
+ #### `@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')
25
+
26
+ Same changes as in `@mui/x-data-grid-pro@8.13.1`.
27
+
28
+ ### Date and Time Pickers
29
+
30
+ #### `@mui/x-date-pickers@8.12.0`
31
+
32
+ Internal changes.
33
+
34
+ #### `@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')
35
+
36
+ Same changes as in `@mui/x-date-pickers@8.12.0`.
37
+
38
+ ### Charts
39
+
40
+ #### `@mui/x-charts@8.13.1`
41
+
42
+ Internal changes.
43
+
44
+ #### `@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')
45
+
46
+ Same changes as in `@mui/x-charts@8.13.1`, plus:
47
+
48
+ - [charts-pro] Fix `@mui/x-charts-pro` failure on import due to missing `@mui/x-internals` release @bernardobelchior
49
+
50
+ #### `@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')
51
+
52
+ Same changes as in `@mui/x-charts-pro@8.13.1`.
53
+
54
+ ### Tree View
55
+
56
+ #### `@mui/x-tree-view@8.13.1`
57
+
58
+ Internal changes.
59
+
60
+ #### `@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')
61
+
62
+ Same changes as in `@mui/x-tree-view@8.13.1`.
63
+
64
+ ### Codemod
65
+
66
+ #### `@mui/x-codemod@8.12.0`
67
+
68
+ Internal changes.
69
+
70
+ ## 8.13.0
71
+
72
+ _Oct 1, 2025_
73
+
74
+ We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
75
+
76
+ - 📊 The chart zoom now supports the `tapAndDrag` gesture. Zoom in/out by tapping twice and dragging vertically.
77
+ - 🔎 Charts now allow [fine-grained control for zoom interactions](https://mui.com/x/react-charts/zoom-and-pan/#zoom-interactions-configuration).
78
+ ```jsx
79
+ <BarChartPro
80
+ zoomInteractionConfig={{
81
+ // Only zoom when Control key is pressed
82
+ zoom: [{ type: 'wheel', keys: ['Control'] }],
83
+ // Only pan when Shift key is pressed
84
+ pan: [{ type: 'drag', keys: ['Shift'] }],
85
+ }}
86
+ />
87
+ ```
88
+ - ➡️ Data Grid grouping rows now persist their expansion state when the rows are updated.
89
+ - 📜 Updated Data Grid vertical scrollbar to include pinned rows and aggregation sections.
90
+ - 📌 Improved the appearance of [pinned columns](https://mui.com/x/react-data-grid/column-pinning/#pinned-columns-appearance) and [pinned rows](https://mui.com/x/react-data-grid/row-pinning/#pinned-rows-appearance) sections in the Data Grid.
91
+ - 🚀 Tree View now fetches the children of expanded items on mount when using lazy loading.
92
+ - 🐞 Bugfixes
93
+ - 📚 Documentation improvements
94
+
95
+ Special thanks go out to the community members for their valuable contributions:
96
+ @sai6855
97
+
98
+ The following are all team members who have contributed to this release:
99
+ @alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @hasdfa, @Janpot, @JCQuintas, @KenanYusuf, @mapache-salvaje, @MBilalShafi, @mnajdova, @rita-codes, @siriwatknp
100
+
101
+ ### Data Grid
102
+
103
+ #### `@mui/x-data-grid@8.13.0`
104
+
105
+ - [DataGrid] Add scroll shadows and fix scrollbar overlap (#16476) @KenanYusuf
106
+ - [DataGrid] Fix row spanning stale state issue (#19733) @MBilalShafi
107
+ - [DataGrid] Fix toolbar `slotProps` not being applied (#19769) @sai6855
108
+ - [DataGrid] Skip calling `fetchRows()` when strategy is not initialized (#19728) @MBilalShafi
109
+
110
+ #### `@mui/x-data-grid-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
111
+
112
+ Same changes as in `@mui/x-data-grid@8.13.0`, plus:
113
+
114
+ - [DataGridPro] Retain expansion state on rows update (#19697) @MBilalShafi
115
+
116
+ #### `@mui/x-data-grid-premium@8.13.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
117
+
118
+ Same changes as in `@mui/x-data-grid-pro@8.13.0`, plus:
119
+
120
+ - [DataGridPremium] Add `metadata.referenceId` to AI assistant prompt resolver (#19695) @hasdfa
121
+ - [DataGridPremium] Fix aggregation value retrieval (#19724) @arminmeh
122
+ - [DataGridPremium] Get correct active chart id while rebuilding data (#19720) @arminmeh
123
+
124
+ ### Date and Time Pickers
125
+
126
+ #### `@mui/x-date-pickers@8.12.0`
127
+
128
+ Internal changes.
129
+
130
+ #### `@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')
131
+
132
+ Same changes as in `@mui/x-date-pickers@8.12.0`.
133
+
134
+ ### Charts
135
+
136
+ #### `@mui/x-charts@8.13.0`
137
+
138
+ - [charts] Add `tapAndDrag` zoom gesture (#19727) @JCQuintas
139
+ - [charts] Add arc focus indicator that follows the arc form (#19696) @mnajdova
140
+ - [charts] Fix outline color (#19752) @alexfauquette
141
+ - [charts] Improve tooltip doc (#19731) @JCQuintas
142
+ - [charts] Make axis highlight reflect the keyboard interaction (#19631) @alexfauquette
143
+ - [charts] Prevent horizontal scroll on keyboard navigation (#19704) @alexfauquette
144
+ - [charts] Simplify gestures by removing bindings (#19767) @JCQuintas
145
+
146
+ #### `@mui/x-charts-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
147
+
148
+ Same changes as in `@mui/x-charts@8.13.0`, plus:
149
+
150
+ - [charts-pro] Allow zoom interactions to be configured (#18646) @JCQuintas
151
+ - [charts-pro] Fix zoom preview having wrong domain in some cases (#19723) @bernardobelchior
152
+
153
+ #### `@mui/x-charts-premium@8.13.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
154
+
155
+ Same changes as in `@mui/x-charts-pro@8.13.0`.
156
+
157
+ ### Tree View
158
+
159
+ #### `@mui/x-tree-view@8.13.0`
160
+
161
+ - [tree view] Export the `apiRef` type of each Tree View component (#19543) @flaviendelangle
162
+ - [tree view] Fix indeterminate checkbox state (#19544) @flaviendelangle
163
+ - [tree view] Improve the lazy loading initial expansion (#19284) @flaviendelangle
164
+ - [tree view] Use Base UI utils whenever possible (#19502) @flaviendelangle
165
+
166
+ #### `@mui/x-tree-view-pro@8.13.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
167
+
168
+ Same changes as in `@mui/x-tree-view@8.13.0`.
169
+
170
+ ### Codemod
171
+
172
+ #### `@mui/x-codemod@8.12.0`
173
+
174
+ Internal changes.
175
+
176
+ ### Docs
177
+
178
+ - [docs] Add a recipe to customize editing component with Autocomplete (#19651) @siriwatknp
179
+ - [docs] Refine the electricity scatter tooltip (#19689) @alexfauquette
180
+ - [docs] Revise the Axis doc (#19052) @mapache-salvaje
181
+ - [docs] Remove reference to nonexistent `FocusedMark` API page (#19773) @bernardobelchior
182
+
183
+ ### Core
184
+
185
+ - [code-infra] Change charts codspeed integration to use walltime (#19729) @JCQuintas
186
+ - [code-infra] Port stylelint from core repo (#19633) @Janpot
187
+ - [code-infra] Stabilize fake timers in regression tests (#19719) @Janpot
188
+ - [code-infra] Stabilize size for bundles with `releaseInfo` (#19674) @Janpot
189
+ - [code-infra] Fix `pnpm-lock.yaml` broken lockfile (#19755) @bernardobelchior
190
+
8
191
  ## 8.12.1
9
192
 
10
193
  _Sep 25, 2025_
@@ -27,12 +27,12 @@ const configuration = {
27
27
  useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributesPro,
28
28
  useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributesPro,
29
29
  useGridRowsOverridableMethods: _internals.useGridRowsOverridableMethods,
30
+ useGridParamsOverridableMethods: _internals.useGridParamsOverridableMethods,
30
31
  useCellAggregationResult: () => null,
31
- useSortValueGetter: apiRef => apiRef.current.getCellValue,
32
32
  useFilterValueGetter: apiRef => apiRef.current.getRowValue
33
33
  }
34
34
  };
35
- const releaseInfo = "MTc1ODc1ODQwMDAwMA==";
35
+ const releaseInfo = "MTc1OTI3NjgwMDAwMA==";
36
36
  const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
37
37
  packageName: "x-data-grid-pro",
38
38
  releaseInfo: releaseInfo
@@ -874,6 +874,11 @@ DataGridProRaw.propTypes = {
874
874
  * The column fields to display pinned to left or right.
875
875
  */
876
876
  pinnedColumns: _propTypes.default.object,
877
+ /**
878
+ * Sets the type of separator between pinned columns and non-pinned columns.
879
+ * @default 'border-and-shadow'
880
+ */
881
+ pinnedColumnsSectionSeparator: _propTypes.default.oneOf(['border-and-shadow', 'border', 'shadow']),
877
882
  /**
878
883
  * Rows data to pin on top or bottom.
879
884
  */
@@ -881,6 +886,11 @@ DataGridProRaw.propTypes = {
881
886
  bottom: _propTypes.default.arrayOf(_propTypes.default.object),
882
887
  top: _propTypes.default.arrayOf(_propTypes.default.object)
883
888
  }),
889
+ /**
890
+ * Sets the type of separator between pinned rows and non-pinned rows.
891
+ * @default 'border-and-shadow'
892
+ */
893
+ pinnedRowsSectionSeparator: _propTypes.default.oneOf(['border-and-shadow', 'border']),
884
894
  /**
885
895
  * Callback called before updating a row with new values in the row and cell editing.
886
896
  * @template R
@@ -89,7 +89,7 @@ const useDataGridProComponent = (apiRef, props, configuration) => {
89
89
  (0, _internals.useGridColumns)(apiRef, props);
90
90
  (0, _internals.useGridRows)(apiRef, props, configuration);
91
91
  (0, _internals.useGridRowSpanning)(apiRef, props);
92
- (0, _internals.useGridParamsApi)(apiRef, props);
92
+ (0, _internals.useGridParamsApi)(apiRef, props, configuration);
93
93
  (0, _useGridDetailPanel.useGridDetailPanel)(apiRef, props);
94
94
  (0, _internals.useGridColumnSpanning)(apiRef);
95
95
  (0, _internals.useGridColumnGrouping)(apiRef, props);
@@ -97,7 +97,7 @@ const useDataGridProComponent = (apiRef, props, configuration) => {
97
97
  (0, _internals.useGridFocus)(apiRef, props);
98
98
  (0, _internals.useGridPreferencesPanel)(apiRef, props);
99
99
  (0, _internals.useGridFilter)(apiRef, props, configuration);
100
- (0, _internals.useGridSorting)(apiRef, props, configuration);
100
+ (0, _internals.useGridSorting)(apiRef, props);
101
101
  (0, _internals.useGridDensity)(apiRef, props);
102
102
  (0, _useGridColumnReorder.useGridColumnReorder)(apiRef, props);
103
103
  (0, _internals.useGridColumnResize)(apiRef, props);
@@ -42,7 +42,9 @@ const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PRO_PROPS_DEFAULT_V
42
42
  lazyLoading: false,
43
43
  lazyLoadingRequestThrottleMs: 500,
44
44
  listView: false,
45
- multipleColumnsSortingMode: 'withModifierKey'
45
+ multipleColumnsSortingMode: 'withModifierKey',
46
+ pinnedColumnsSectionSeparator: 'border-and-shadow',
47
+ pinnedRowsSectionSeparator: 'border-and-shadow'
46
48
  });
47
49
  const defaultSlots = _dataGridProDefaultSlotsComponents.DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
48
50
  const useDataGridProProps = inProps => {
@@ -5,7 +5,7 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
7
7
  import { GridRoot, GridContextProvider } from '@mui/x-data-grid';
8
- import { validateProps, useGridApiInitialization, useGridRowsOverridableMethods } from '@mui/x-data-grid/internals';
8
+ import { validateProps, useGridApiInitialization, useGridRowsOverridableMethods, useGridParamsOverridableMethods } from '@mui/x-data-grid/internals';
9
9
  import { useMaterialCSSVariables } from '@mui/x-data-grid/material';
10
10
  import { forwardRef } from '@mui/x-internals/forwardRef';
11
11
  import { useDataGridProComponent } from "./useDataGridProComponent.js";
@@ -20,12 +20,12 @@ const configuration = {
20
20
  useGridAriaAttributes: useGridAriaAttributesPro,
21
21
  useGridRowAriaAttributes: useGridRowAriaAttributesPro,
22
22
  useGridRowsOverridableMethods,
23
+ useGridParamsOverridableMethods,
23
24
  useCellAggregationResult: () => null,
24
- useSortValueGetter: apiRef => apiRef.current.getCellValue,
25
25
  useFilterValueGetter: apiRef => apiRef.current.getRowValue
26
26
  }
27
27
  };
28
- const releaseInfo = "MTc1ODc1ODQwMDAwMA==";
28
+ const releaseInfo = "MTc1OTI3NjgwMDAwMA==";
29
29
  const watermark = /*#__PURE__*/_jsx(Watermark, {
30
30
  packageName: "x-data-grid-pro",
31
31
  releaseInfo: releaseInfo
@@ -867,6 +867,11 @@ DataGridProRaw.propTypes = {
867
867
  * The column fields to display pinned to left or right.
868
868
  */
869
869
  pinnedColumns: PropTypes.object,
870
+ /**
871
+ * Sets the type of separator between pinned columns and non-pinned columns.
872
+ * @default 'border-and-shadow'
873
+ */
874
+ pinnedColumnsSectionSeparator: PropTypes.oneOf(['border-and-shadow', 'border', 'shadow']),
870
875
  /**
871
876
  * Rows data to pin on top or bottom.
872
877
  */
@@ -874,6 +879,11 @@ DataGridProRaw.propTypes = {
874
879
  bottom: PropTypes.arrayOf(PropTypes.object),
875
880
  top: PropTypes.arrayOf(PropTypes.object)
876
881
  }),
882
+ /**
883
+ * Sets the type of separator between pinned rows and non-pinned rows.
884
+ * @default 'border-and-shadow'
885
+ */
886
+ pinnedRowsSectionSeparator: PropTypes.oneOf(['border-and-shadow', 'border']),
877
887
  /**
878
888
  * Callback called before updating a row with new values in the row and cell editing.
879
889
  * @template R
@@ -82,7 +82,7 @@ export const useDataGridProComponent = (apiRef, props, configuration) => {
82
82
  useGridColumns(apiRef, props);
83
83
  useGridRows(apiRef, props, configuration);
84
84
  useGridRowSpanning(apiRef, props);
85
- useGridParamsApi(apiRef, props);
85
+ useGridParamsApi(apiRef, props, configuration);
86
86
  useGridDetailPanel(apiRef, props);
87
87
  useGridColumnSpanning(apiRef);
88
88
  useGridColumnGrouping(apiRef, props);
@@ -90,7 +90,7 @@ export const useDataGridProComponent = (apiRef, props, configuration) => {
90
90
  useGridFocus(apiRef, props);
91
91
  useGridPreferencesPanel(apiRef, props);
92
92
  useGridFilter(apiRef, props, configuration);
93
- useGridSorting(apiRef, props, configuration);
93
+ useGridSorting(apiRef, props);
94
94
  useGridDensity(apiRef, props);
95
95
  useGridColumnReorder(apiRef, props);
96
96
  useGridColumnResize(apiRef, props);
@@ -34,7 +34,9 @@ export const DATA_GRID_PRO_PROPS_DEFAULT_VALUES = _extends({}, DATA_GRID_PROPS_D
34
34
  lazyLoading: false,
35
35
  lazyLoadingRequestThrottleMs: 500,
36
36
  listView: false,
37
- multipleColumnsSortingMode: 'withModifierKey'
37
+ multipleColumnsSortingMode: 'withModifierKey',
38
+ pinnedColumnsSectionSeparator: 'border-and-shadow',
39
+ pinnedRowsSectionSeparator: 'border-and-shadow'
38
40
  });
39
41
  const defaultSlots = DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS;
40
42
  export const useDataGridProProps = inProps => {
@@ -94,8 +94,8 @@ export const useGridColumnHeadersPro = props => {
94
94
  const pinnedOffset = getPinnedCellOffset(pinnedPosition, colDef.computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth);
95
95
  const indexInSection = i;
96
96
  const sectionLength = renderedColumns.length;
97
- const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection);
98
- const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
97
+ const showLeftBorder = shouldCellShowLeftBorder(pinnedPosition, indexInSection, rootProps.showColumnVerticalBorder, rootProps.pinnedColumnsSectionSeparator);
98
+ const showRightBorder = shouldCellShowRightBorder(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller, rootProps.pinnedColumnsSectionSeparator);
99
99
  filters.push(/*#__PURE__*/_jsx(rootProps.slots.headerFilterCell, _extends({
100
100
  colIndex: columnIndex,
101
101
  height: headerFilterHeight,
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.12.1
2
+ * @mui/x-data-grid-pro v8.13.1
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
@@ -51,7 +51,7 @@ export const insertDataRowInTree = ({
51
51
  childrenExpanded: false,
52
52
  serverChildrenCount
53
53
  };
54
- const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
54
+ const shouldFetchChildren = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
55
55
  if (shouldFetchChildren) {
56
56
  groupsToFetch?.add(id);
57
57
  }
@@ -111,7 +111,7 @@ export const insertDataRowInTree = ({
111
111
  childrenExpanded: false
112
112
  };
113
113
  updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
114
- insertNodeInTree(updateGroupDefaultExpansion(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault), tree, treeDepths, previousTree);
114
+ insertNodeInTree(updateGroupDefaultExpansion(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
115
115
  parentNodeId = nodeId;
116
116
  }
117
117
  // For the intermediary steps of the path
@@ -133,7 +133,7 @@ export const insertDataRowInTree = ({
133
133
  childrenFromPath: {},
134
134
  childrenExpanded: false
135
135
  };
136
- tree[existingNodeIdWithPartialPath] = updateGroupDefaultExpansion(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
136
+ tree[existingNodeIdWithPartialPath] = updateGroupDefaultExpansion(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
137
137
  }
138
138
  parentNodeId = currentGroupNode.id;
139
139
  }
@@ -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"]) => boolean;
14
- export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"]) => GridGroupNode;
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;
15
15
  /**
16
16
  * Insert a node in the tree
17
17
  */
@@ -20,19 +20,19 @@ export const getNodePathInTree = ({
20
20
  path.reverse();
21
21
  return path;
22
22
  };
23
- export const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault) => {
23
+ export const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
24
24
  let childrenExpanded;
25
25
  if (node.id === GRID_ROOT_GROUP_ID) {
26
26
  childrenExpanded = true;
27
27
  } else if (isGroupExpandedByDefault) {
28
28
  childrenExpanded = isGroupExpandedByDefault(node);
29
29
  } else {
30
- childrenExpanded = defaultGroupingExpansionDepth === -1 || defaultGroupingExpansionDepth > node.depth;
30
+ childrenExpanded = defaultGroupingExpansionDepth === -1 || defaultGroupingExpansionDepth > node.depth || (prevChildrenExpanded ?? false);
31
31
  }
32
32
  return childrenExpanded;
33
33
  };
34
- export const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault) => {
35
- const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
34
+ export const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
35
+ const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded);
36
36
  node.childrenExpanded = childrenExpanded;
37
37
  return node;
38
38
  };
@@ -102,8 +102,8 @@ const useGridColumnHeadersPro = props => {
102
102
  const pinnedOffset = getPinnedCellOffset(pinnedPosition, colDef.computedWidth, columnIndex, columnPositions, columnsTotalWidth, scrollbarWidth);
103
103
  const indexInSection = i;
104
104
  const sectionLength = renderedColumns.length;
105
- const showLeftBorder = (0, _internals.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
106
- const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller);
105
+ const showLeftBorder = (0, _internals.shouldCellShowLeftBorder)(pinnedPosition, indexInSection, rootProps.showColumnVerticalBorder, rootProps.pinnedColumnsSectionSeparator);
106
+ const showRightBorder = (0, _internals.shouldCellShowRightBorder)(pinnedPosition, indexInSection, sectionLength, rootProps.showColumnVerticalBorder, gridHasFiller, rootProps.pinnedColumnsSectionSeparator);
107
107
  filters.push(/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.headerFilterCell, (0, _extends2.default)({
108
108
  colIndex: columnIndex,
109
109
  height: headerFilterHeight,
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.12.1
2
+ * @mui/x-data-grid-pro v8.13.1
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.12.1",
3
+ "version": "8.13.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",
@@ -33,14 +33,14 @@
33
33
  "directory": "packages/x-data-grid-pro"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.28.2",
36
+ "@babel/runtime": "^7.28.4",
37
37
  "@mui/utils": "^7.3.2",
38
38
  "@types/format-util": "^1.0.4",
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
- "@mui/x-data-grid": "8.12.1",
42
- "@mui/x-license": "8.12.0",
43
- "@mui/x-internals": "8.12.0"
41
+ "@mui/x-data-grid": "8.13.1",
42
+ "@mui/x-internals": "8.13.1",
43
+ "@mui/x-license": "8.12.0"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@emotion/react": "^11.9.0",
@@ -57,7 +57,7 @@ const insertDataRowInTree = ({
57
57
  childrenExpanded: false,
58
58
  serverChildrenCount
59
59
  };
60
- const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
60
+ const shouldFetchChildren = (0, _utils.checkGroupChildrenExpansion)(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[id]?.childrenExpanded);
61
61
  if (shouldFetchChildren) {
62
62
  groupsToFetch?.add(id);
63
63
  }
@@ -117,7 +117,7 @@ const insertDataRowInTree = ({
117
117
  childrenExpanded: false
118
118
  };
119
119
  updatedGroupsManager?.addAction(parentNodeId, 'insertChildren');
120
- (0, _utils.insertNodeInTree)((0, _utils.updateGroupDefaultExpansion)(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault), tree, treeDepths, previousTree);
120
+ (0, _utils.insertNodeInTree)((0, _utils.updateGroupDefaultExpansion)(autoGeneratedGroupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[nodeId]?.childrenExpanded), tree, treeDepths, previousTree);
121
121
  parentNodeId = nodeId;
122
122
  }
123
123
  // For the intermediary steps of the path
@@ -139,7 +139,7 @@ const insertDataRowInTree = ({
139
139
  childrenFromPath: {},
140
140
  childrenExpanded: false
141
141
  };
142
- tree[existingNodeIdWithPartialPath] = (0, _utils.updateGroupDefaultExpansion)(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
142
+ tree[existingNodeIdWithPartialPath] = (0, _utils.updateGroupDefaultExpansion)(groupNode, defaultGroupingExpansionDepth, isGroupExpandedByDefault, previousTree?.[currentGroupNode.id]?.childrenExpanded);
143
143
  }
144
144
  parentNodeId = currentGroupNode.id;
145
145
  }
@@ -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"]) => boolean;
14
- export declare const updateGroupDefaultExpansion: (node: GridGroupNode, defaultGroupingExpansionDepth: number, isGroupExpandedByDefault?: DataGridProProps["isGroupExpandedByDefault"]) => GridGroupNode;
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;
15
15
  /**
16
16
  * Insert a node in the tree
17
17
  */
@@ -29,20 +29,20 @@ const getNodePathInTree = ({
29
29
  return path;
30
30
  };
31
31
  exports.getNodePathInTree = getNodePathInTree;
32
- const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault) => {
32
+ const checkGroupChildrenExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
33
33
  let childrenExpanded;
34
34
  if (node.id === _xDataGrid.GRID_ROOT_GROUP_ID) {
35
35
  childrenExpanded = true;
36
36
  } else if (isGroupExpandedByDefault) {
37
37
  childrenExpanded = isGroupExpandedByDefault(node);
38
38
  } else {
39
- childrenExpanded = defaultGroupingExpansionDepth === -1 || defaultGroupingExpansionDepth > node.depth;
39
+ childrenExpanded = defaultGroupingExpansionDepth === -1 || defaultGroupingExpansionDepth > node.depth || (prevChildrenExpanded ?? false);
40
40
  }
41
41
  return childrenExpanded;
42
42
  };
43
43
  exports.checkGroupChildrenExpansion = checkGroupChildrenExpansion;
44
- const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault) => {
45
- const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault);
44
+ const updateGroupDefaultExpansion = (node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded) => {
45
+ const childrenExpanded = checkGroupChildrenExpansion(node, defaultGroupingExpansionDepth, isGroupExpandedByDefault, prevChildrenExpanded);
46
46
  node.childrenExpanded = childrenExpanded;
47
47
  return node;
48
48
  };