@mui/x-data-grid-pro 8.27.0 → 9.0.0-alpha.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
@@ -1,9 +1,261 @@
1
1
  # Changelog
2
2
 
3
- > For full v8 changelog, please refer to the [v.8x branch](https://github.com/mui/mui-x/blob/v8.x/CHANGELOG.md).
3
+ ## 9.0.0-alpha.0
4
4
 
5
- All notable changes to this project will be documented in this file.
6
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+ _Feb 16, 2026_
6
+
7
+ We'd like to extend a big thank you to the 21 contributors who made this release possible. Here are some highlights ✨:
8
+
9
+ - Add support for virtualized items on `<RichTreeViewPro />`:
10
+
11
+ ```tsx
12
+ <RichTreeViewPro items={ITEMS} virtualization itemHeight={48} />
13
+ ```
14
+
15
+ - Add Thai (`thTH`) locale on the Data Grid and the Date and Time Pickers (#21116) @siriwatknp
16
+ - Add a new `AdapterDayjsBuddhist` adapter for Date and Time Pickers (#20984) @siriwatknp
17
+ - Add support for virtualization in the rich tree view (#20780) @flaviendelangle
18
+ - Add WebGL renderer to Heatmap (#20756) @bernardobelchior
19
+
20
+ Special thanks go out to these community members for their valuable contributions:
21
+ @jhe-iqbis
22
+
23
+ The following team members contributed to this release:
24
+ @alexfauquette, @arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @dav-is, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @mj12albert, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
25
+
26
+ ### Data Grid
27
+
28
+ #### `@mui/x-data-grid@9.0.0-alpha.0`
29
+
30
+ - [DataGrid] Update default `logicOperator` behavior in filtering docs (#21098) @michelengelen
31
+ - [DataGrid] Add `thTH` locale (#21116) @siriwatknp
32
+ - [DataGrid] Fix initial filter value state in CustomMultiValueOperator demo (#21217) @sai6855
33
+
34
+ #### `@mui/x-data-grid-pro@9.0.0-alpha.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-data-grid@9.0.0-alpha.0`, plus:
37
+
38
+ - [DataGridPro] Cleanup outdated rows on `dataSource` reference update (#21138) @MBilalShafi
39
+
40
+ #### `@mui/x-data-grid-premium@9.0.0-alpha.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
41
+
42
+ Same changes as in `@mui/x-data-grid-pro@9.0.0-alpha.0`.
43
+
44
+ ### Date and Time Pickers
45
+
46
+ #### `@mui/x-date-pickers@9.0.0-alpha.0`
47
+
48
+ - [pickers] Add `AdapterDayjsBuddhist` adapter (#20984) @siriwatknp
49
+ - [pickers] Add `thTH` locale (#21116) @siriwatknp
50
+
51
+ #### `@mui/x-date-pickers-pro@9.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@9.0.0-alpha.0`.
54
+
55
+ ### Charts
56
+
57
+ #### `@mui/x-charts@9.0.0-alpha.0`
58
+
59
+ - [charts] Add Legend actions (#20404) @JCQuintas
60
+ - [charts] Add `Chart` suffix to MUI Classes (#21042) @JCQuintas
61
+ - [charts] Add `axesGap` props to put space between axes (#20904) @alexfauquette
62
+ - [charts] Add `cleanIdentifier` function to charts series instance (#20832) @JCQuintas
63
+ - [charts] Add `initialHiddenItems` prop to set initial state (#20894) @JCQuintas
64
+ - [charts] Add `useXAxisCoordinates` and `useYAxisCoordinates` hooks (#20972) @bernardobelchior
65
+ - [charts] Add axis slots and expose axis ticks hooks (#20935) @bernardobelchior
66
+ - [charts] Change `line` legend marker to be a line (#21059) @JCQuintas
67
+ - [charts] Codemod test pattern with function (#21111) @JCQuintas
68
+ - [charts] Control the item tooltip (#20617) @alexfauquette
69
+ - [charts] Enable keyboard navigation in radar chart (#20765) @alexfauquette
70
+ - [charts] Export `CartesianChartSeriesType` and `StackableChartSeriesType` (#21012) @bernardobelchior
71
+ - [charts] Export plugins from premium (#20866) @JCQuintas
72
+ - [charts] Filter hidden series from axis tooltip (#21273) @Copilot
73
+ - [charts] Filter hidden series from axis tooltip (#21273) @Copilot
74
+ - [charts] Fix rename `getSVGPoint` to `getChartPoint` (#21335) @bernardobelchior
75
+ - [charts] Fix cleanup function in useChartInteractionListener to correctly remove event listeners with options (#21218) @sai6855
76
+ - [charts] Fix import rename in codemod (#21112) @JCQuintas
77
+ - [charts] Fix multiple exports of `HighlightScope` (#21270) @bernardobelchior
78
+ - [charts] Fix test inconsistency in charts (#20907) @JCQuintas
79
+ - [charts] Fix tooltip position for stacked line series (#20901) @alexfauquette
80
+ - [charts] Make Highlight scope a generic (#21189) @alexfauquette
81
+ - [charts] Make `LegendItemParams.type` required (#21003) @alexfauquette
82
+ - [charts] Make `seriesId` a string only (#20997) @alexfauquette
83
+ - [charts] Make the `useChartRootRef` support typing parameter (#21023) @alexfauquette
84
+ - [charts] Memoize HeatmapItem to avoid re-render when fading/highlighting (#20865) @bernardobelchior
85
+ - [charts] Move axis id to `data-axis-id` attribute instead of class (#21037) @JCQuintas
86
+ - [charts] Move `cleanIdentifier` and `serializeIdentifier` instance methods to `useChartSeriesConfig` plugin (#21025) @JCQuintas
87
+ - [charts] Move `seriesConfig` to `useChartSeriesConfig` plugin (#21004) @JCQuintas
88
+ - [charts] Move element refs to `useChartElementRef` plugin (#21099) @JCQuintas
89
+ - [charts] Move types related to `seriesConfig` into the `useChartSeriesConfig` plugin folder (#21026) @JCQuintas
90
+ - [charts] Remove `data-has-focused-item` from `ChartsSurface` (#21255) @bernardobelchior
91
+ - [charts] Remove default generic of item identifiers (#21182) @alexfauquette
92
+ - [charts] Remove deprecated `id` from `LegendItemParams` (#21055) @alexfauquette
93
+ - [charts] Remove deprecated `ChartApi` export from `ChartContainer` (#20975) @JCQuintas
94
+ - [charts] Remove deprecated `useAxisTooltip` in favor of `useAxesTooltip` (#20962) @Copilot
95
+ - [charts] Remove deprecated series type helpers and functions (#20998) @alexfauquette
96
+ - [charts] Rename `ChartContainer` to `ChartsContainer` (#21173) @JCQuintas
97
+ - [charts] Rename `getSVGPoint` to `getChartPoint` (#21322) @bernardobelchior
98
+ - [charts] Rename `TickItemType` to `TickItem` (#21008) @bernardobelchior
99
+ - [charts] Replace props `id` by `seriesId` when necessary (#21057) @alexfauquette
100
+ - [charts] Revert `touch-action: pan-y` removal when zoom is disabled (#20852) @bernardobelchior
101
+ - [charts] The `useXxxSeries([])` return empty array (#21001) @alexfauquette
102
+ - [charts] Use `NumberValue` in domain limit function (#21054) @JCQuintas
103
+
104
+ #### `@mui/x-charts-pro@9.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
105
+
106
+ Same changes as in `@mui/x-charts@9.0.0-alpha.0`, plus:
107
+
108
+ - [charts-pro] Add border radius to heatmap (#20931) @bernardobelchior
109
+ - [charts-pro] Add keyboard navigation to funnel (#20766) @alexfauquette
110
+ - [charts-pro] Add keyboard navigation to heatmap (#20786) @alexfauquette
111
+ - [charts-pro] Add keyboard navigation to sankey (#20777) @alexfauquette
112
+ - [charts-pro] Fix Heatmap's `onItemClick` not triggering (#21016) @bernardobelchior
113
+ - [charts-pro] Fix crash when two same-direction axes have a zoom preview (#20916) @bernardobelchior
114
+ - [charts-pro] Handle edge case in export image (#21190) @bernardobelchior
115
+ - [charts-pro] Prefer global pointer interaction tracker in Heatmap (#20697) @bernardobelchior
116
+ - [charts-pro] Support composition for Sankey (#20604) @alexfauquette
117
+ - [charts-pro] Update Heatmap identifier (#21124) @alexfauquette
118
+ - [charts-pro] Update default value of `hideLegend` prop in `Heatmap` (#20961) @Copilot
119
+
120
+ #### `@mui/x-charts-premium@9.0.0-alpha.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
121
+
122
+ Same changes as in `@mui/x-charts-pro@9.0.0-alpha.0`, plus:
123
+
124
+ - [charts-premium] Add WebGL renderer to Heatmap (#20756) @bernardobelchior
125
+ - [charts-premium] Add `ChartContainerPremium` (#20910) @bernardobelchior
126
+ - [charts-premium] Add `HeatmapPremium` (#20930) @bernardobelchior
127
+ - [charts-premium] Add keyboard navigation to range-bar (#21272) @alexfauquette
128
+ - [charts-premium] Extract `HeatmapSVGPlot` from `HeatmapPlot` component (#21015) @bernardobelchior
129
+ - [charts-premium] Fix `ChartDataProviderPremium` tests (#20868) @bernardobelchior
130
+ - [charts-premium] Fix links in comments for chart containers and data providers (#21105) @bernardobelchior
131
+
132
+ ### Tree View
133
+
134
+ #### `@mui/x-tree-view@9.0.0-alpha.0`
135
+
136
+ _No changes._
137
+
138
+ #### `@mui/x-tree-view-pro@9.0.0-alpha.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
139
+
140
+ Same changes as in `@mui/x-tree-view@9.0.0-alpha.0`, plus:
141
+
142
+ - [RichTreeViewPro] Add support for virtualization (#20780) @flaviendelangle
143
+
144
+ ### Codemod
145
+
146
+ #### `@mui/x-codemod@9.0.0-alpha.0`
147
+
148
+ - [codemod] Document and Clean the codemod utils (#21014) @alexfauquette
149
+
150
+ ### Docs
151
+
152
+ - [docs] Add focus highlight in composition snipets (#20614) @alexfauquette
153
+ - [docs] Add simple candlestick chart demo (#20912) @bernardobelchior
154
+ - [docs] Fix Waterfall Chart documentation badge from Pro to Premium (#20888) @Copilot
155
+ - [docs] Fix broken links on Data Grid Editing sub-pages (#20911) @arminmeh
156
+ - [docs] Fix docs API for HeatmapPremium (#21137) @alexfauquette
157
+ - [docs] Fix horizontal overflow in heatmap docs (#20968) @bernardobelchior
158
+ - [docs] Move Range Bar Chart to existing charts (#21120) @bernardobelchior
159
+ - [docs] Prepare the scheduler doc for the alpha (#21268) @flaviendelangle
160
+ - [docs] Rewording of the heatmap item click (#20987) @alexfauquette
161
+ - [scheduler][docs] Create the Quickstart page (#20913) @flaviendelangle
162
+ - [charts][docs] Revise the Charts CSP doc (#20906) @mapache-salvaje
163
+ - [charts][docs] Revise the Charts Composition doc (#20032) @mapache-salvaje
164
+ - [charts][docs] Revise the Charts Hooks Overview doc (#20921) @mapache-salvaje
165
+ - [charts][docs] Revise the Charts Legend doc (#20821) @mapache-salvaje
166
+ - [charts][docs] Revise the Charts Localization doc (#20800) @mapache-salvaje
167
+ - [charts][docs] Revise the Charts Plugins doc (#20933) @mapache-salvaje
168
+ - [charts][docs] Revise the Charts Stacking doc (#20830) @mapache-salvaje
169
+ - [charts][docs] Revise the Charts Styling doc (#20835) @mapache-salvaje
170
+ - [charts][docs] Revise the Charts Toolbar doc (#20867) @mapache-salvaje
171
+ - [charts][docs] Revise the Charts Tooltip doc (#20869) @mapache-salvaje
172
+ - [charts][docs] Revise the Charts Zoom and Pan doc (#20893) @mapache-salvaje
173
+ - [DataGrid][docs] Add a recipe for handling long text cell (#20754) @siriwatknp
174
+ - [DataGrid][docs] Add high-level competitor comparison to Overview doc (DX-117) (#20870) @mapache-salvaje
175
+ - [DataGrid][docs] Remove Bundling section from quickstart (#21177) @MBilalShafi
176
+
177
+ ### Core
178
+
179
+ - [code-infra] Add `MUI_TEST_ENV` global (#21187) @Janpot
180
+ - [code-infra] Fix `material-ui/disallow-react-api-in-server-components` (#20909) @JCQuintas
181
+ - [code-infra] Fix `renameImports` codemod not preserving comments (#20977) @JCQuintas
182
+ - [code-infra] Fix the label comparison to use lower case (#20934) @brijeshb42
183
+ - [code-infra] Github action to sync title and label (#20922) @brijeshb42
184
+ - [code-infra] Ignore scheduler demo with random data (#20982) @JCQuintas
185
+ - [code-infra] Improve `codemod` testing setup (#20981) @JCQuintas
186
+ - [code-infra] Only ignore renovate[bot] in changelog generation script (#21185) @bernardobelchior
187
+ - [code-infra] Prepare for v9 (#20860) @JCQuintas
188
+ - [code-infra] Set `rasterizehtml` version in pnpm catalog (#21175) @bernardobelchior
189
+ - [code-infra] Update codeowners (#20886) @JCQuintas
190
+ - [code-infra] V9 preparation (#20928) @JCQuintas
191
+ - [code-infra] eslint rule rename (#21172) @Janpot
192
+ - [code-infra][docs] V9 charts migration doc kickoff (#20973) @JCQuintas
193
+ - [docs-infra] Add Cookie Banner and Analytics Provider (#21228) @dav-is
194
+ - [docs-infra] Fix missing slots section on API page (#20915) @Janpot
195
+ - [docs-infra] Fix two broken links (#20914) @Janpot
196
+ - [docs-infra] Port demo changes (#20971) @Janpot
197
+ - [internal] Add information about codemods to AGENTS.md (#21011) @bernardobelchior
198
+ - [internal] Fix codemod versioning instructions in `AGENTS.md` (#21024) @bernardobelchior
199
+ - [internal] Fix missing generated props in master (#21142) @bernardobelchior
200
+ - [internal] Headless sorting plugin (#21089) @arminmeh
201
+ - [internal] Remove duplicate code (#20896) @oliviertassinari
202
+
203
+ ### Miscellaneous
204
+
205
+ - Bump next to ^15.5.11 (#21171) @Copilot
206
+ - [core] Fix CI (#21223) @flaviendelangle
207
+ - [PoC] Headless data grid (#20645) @cherniavskii
208
+
209
+ ## v8.27.1
210
+
211
+ _Feb 13, 2026_
212
+
213
+ We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
214
+
215
+ - 📝 CSS bundler support is no longer needed for the Data Grid
216
+ - 🐞 Bugfixes
217
+
218
+ Special thanks go out to these community members for their valuable contributions:
219
+ @sai6855
220
+
221
+ The following team members contributed to this release:
222
+ @arminmeh, @cherniavskii, @flaviendelangle, @mj12albert, @MBilalShafi
223
+
224
+ ### Data Grid
225
+
226
+ #### `@mui/x-data-grid@8.27.1`
227
+
228
+ - [DataGrid] Hide column menu icon when there are no items (#21303) @MBilalShafi
229
+ - [DataGrid] Migrate styled imports and remove `index.css` (#21176) @MBilalShafi
230
+ - [DataGrid] Optimize `GridRootStyles` overrides resolver (#21251) @sai6855
231
+
232
+ #### `@mui/x-data-grid-pro@8.27.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
233
+
234
+ Same changes as in `@mui/x-data-grid@8.27.1`, plus:
235
+
236
+ - [DataGridPro] Fix column pinning issue with `restoreState` (#21305) @MBilalShafi
237
+ - [DataGridPro] Fix lazy loading params for page with one row (#21238) @MBilalShafi
238
+ - [DataGridPro] Properly extract parent path (#21301) @arminmeh
239
+
240
+ #### `@mui/x-data-grid-premium@8.27.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
241
+
242
+ Same changes as in `@mui/x-data-grid-pro@8.27.1`, plus:
243
+
244
+ - [DataGridPremium] Fix aggregation display when `initialState` has both `sortModel` and `pinnedColumns` (#21152) @mj12albert
245
+
246
+ ### Tree View
247
+
248
+ #### `@mui/x-tree-view@8.27.1`
249
+
250
+ - [tree view] Fix `apiRef.current.setItemExpansion()` (#21095) @flaviendelangle
251
+
252
+ #### `@mui/x-tree-view-pro@8.27.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
253
+
254
+ Same changes as in `@mui/x-tree-view@8.27.1`.
255
+
256
+ ### Core
257
+
258
+ - [internal] Add CLI for translation using LLM (#21299) @cherniavskii
7
259
 
8
260
  ## v8.27.0
9
261
 
@@ -34,7 +34,7 @@ const configuration = {
34
34
  useFilterValueGetter: apiRef => apiRef.current.getRowValue
35
35
  }
36
36
  };
37
- const releaseInfo = "MTc2OTk5MDQwMDAwMA==";
37
+ const releaseInfo = "MTc3MTIwMDAwMDAwMA==";
38
38
  const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
39
39
  packageName: "x-data-grid-pro",
40
40
  releaseInfo: releaseInfo
@@ -1,4 +1,4 @@
1
- import { type GridColumnMenuProps } from '@mui/x-data-grid';
1
+ import type { GridColumnMenuComponent } from '@mui/x-data-grid/internals';
2
2
  import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.js";
3
3
  export declare const GRID_COLUMN_MENU_SLOTS_PRO: {
4
4
  columnMenuPinningItem: typeof GridColumnMenuPinningItem;
@@ -20,4 +20,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PRO: {
20
20
  displayOrder: number;
21
21
  };
22
22
  };
23
- export declare const GridProColumnMenu: import("react").ForwardRefExoticComponent<GridColumnMenuProps> | import("react").ForwardRefExoticComponent<GridColumnMenuProps & import("react").RefAttributes<HTMLUListElement>>;
23
+ export declare const GridProColumnMenu: GridColumnMenuComponent;
@@ -26,4 +26,6 @@ const GridProColumnMenu = exports.GridProColumnMenu = (0, _forwardRef.forwardRef
26
26
  ref: ref
27
27
  }));
28
28
  });
29
- if (process.env.NODE_ENV !== "production") GridProColumnMenu.displayName = "GridProColumnMenu";
29
+ if (process.env.NODE_ENV !== "production") GridProColumnMenu.displayName = "GridProColumnMenu";
30
+ GridProColumnMenu.defaultSlots = GRID_COLUMN_MENU_SLOTS_PRO;
31
+ GridProColumnMenu.defaultSlotProps = GRID_COLUMN_MENU_SLOT_PROPS_PRO;
@@ -11,7 +11,7 @@ exports.renderRowReorderCell = void 0;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _propTypes = _interopRequireDefault(require("prop-types"));
14
- var _system = require("@mui/system");
14
+ var _styles = require("@mui/material/styles");
15
15
  var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
16
16
  var _xDataGrid = require("@mui/x-data-grid");
17
17
  var _internals = require("@mui/x-data-grid/internals");
@@ -29,7 +29,7 @@ const useUtilityClasses = ownerState => {
29
29
  };
30
30
  return (0, _composeClasses.default)(slots, _xDataGrid.getDataGridUtilityClass, classes);
31
31
  };
32
- const RowReorderIcon = (0, _system.styled)('svg', {
32
+ const RowReorderIcon = (0, _styles.styled)('svg', {
33
33
  name: 'MuiDataGrid',
34
34
  slot: 'RowReorderIcon'
35
35
  })({
@@ -27,7 +27,7 @@ const configuration = {
27
27
  useFilterValueGetter: apiRef => apiRef.current.getRowValue
28
28
  }
29
29
  };
30
- const releaseInfo = "MTc2OTk5MDQwMDAwMA==";
30
+ const releaseInfo = "MTc3MTIwMDAwMDAwMA==";
31
31
  const watermark = /*#__PURE__*/_jsx(Watermark, {
32
32
  packageName: "x-data-grid-pro",
33
33
  releaseInfo: releaseInfo
@@ -1,4 +1,4 @@
1
- import { type GridColumnMenuProps } from '@mui/x-data-grid';
1
+ import type { GridColumnMenuComponent } from '@mui/x-data-grid/internals';
2
2
  import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.js";
3
3
  export declare const GRID_COLUMN_MENU_SLOTS_PRO: {
4
4
  columnMenuPinningItem: typeof GridColumnMenuPinningItem;
@@ -20,4 +20,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PRO: {
20
20
  displayOrder: number;
21
21
  };
22
22
  };
23
- export declare const GridProColumnMenu: import("react").ForwardRefExoticComponent<GridColumnMenuProps> | import("react").ForwardRefExoticComponent<GridColumnMenuProps & import("react").RefAttributes<HTMLUListElement>>;
23
+ export declare const GridProColumnMenu: GridColumnMenuComponent;
@@ -20,4 +20,6 @@ export const GridProColumnMenu = forwardRef(function GridProColumnMenu(props, re
20
20
  ref: ref
21
21
  }));
22
22
  });
23
- if (process.env.NODE_ENV !== "production") GridProColumnMenu.displayName = "GridProColumnMenu";
23
+ if (process.env.NODE_ENV !== "production") GridProColumnMenu.displayName = "GridProColumnMenu";
24
+ GridProColumnMenu.defaultSlots = GRID_COLUMN_MENU_SLOTS_PRO;
25
+ GridProColumnMenu.defaultSlotProps = GRID_COLUMN_MENU_SLOT_PROPS_PRO;
@@ -3,7 +3,7 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { styled } from '@mui/system';
6
+ import { styled } from '@mui/material/styles';
7
7
  import composeClasses from '@mui/utils/composeClasses';
8
8
  import { gridSortModelSelector, useGridApiContext, useGridSelector, getDataGridUtilityClass, gridClasses } from '@mui/x-data-grid';
9
9
  import { gridEditRowsStateSelector, isEventTargetInPortal, vars } from '@mui/x-data-grid/internals';
@@ -104,7 +104,11 @@ export const useGridColumnPinning = (apiRef, props) => {
104
104
  const stateRestorePreProcessing = React.useCallback((params, context) => {
105
105
  const newPinnedColumns = context.stateToRestore.pinnedColumns;
106
106
  if (newPinnedColumns != null) {
107
+ apiRef.current.caches.columnPinning.orderedFieldsBeforePinningColumns = null;
107
108
  setState(apiRef, newPinnedColumns);
109
+ return _extends({}, params, {
110
+ callbacks: [...params.callbacks, () => apiRef.current.requestPipeProcessorsApplication('hydrateColumns')]
111
+ });
108
112
  }
109
113
  return params;
110
114
  }, [apiRef]);
@@ -1,6 +1,23 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
2
  import { type GridRowEntry } from '@mui/x-data-grid';
3
3
  import type { GridPrivateApiPro } from "../../../models/gridApiPro.js";
4
+ interface GridRowRenderContext {
5
+ firstRowIndex: number;
6
+ lastRowIndex: number;
7
+ }
8
+ interface AdjustRowParamsOptions {
9
+ pageSize: number;
10
+ rowCount: number | undefined;
11
+ }
12
+ /**
13
+ * Adjusts the row fetch parameters to align with page boundaries.
14
+ * - Start index is decreased to the start of the page
15
+ * - End index is increased to the end of the page (capped by rowCount - 1 if defined)
16
+ */
17
+ export declare const adjustRowParams: <T extends {
18
+ start: number | string;
19
+ end: number;
20
+ }>(params: T, options: AdjustRowParamsOptions) => T;
4
21
  export declare const findSkeletonRowsSection: ({
5
22
  apiRef,
6
23
  visibleRows,
@@ -8,11 +25,9 @@ export declare const findSkeletonRowsSection: ({
8
25
  }: {
9
26
  apiRef: RefObject<GridPrivateApiPro>;
10
27
  visibleRows: GridRowEntry[];
11
- range: {
12
- firstRowIndex: number;
13
- lastRowIndex: number;
14
- };
28
+ range: GridRowRenderContext;
15
29
  }) => {
16
30
  firstRowIndex: number;
17
31
  lastRowIndex: number;
18
- } | undefined;
32
+ } | undefined;
33
+ export {};
@@ -1,4 +1,27 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
1
2
  import { gridRowNodeSelector } from '@mui/x-data-grid';
3
+ /**
4
+ * Adjusts the row fetch parameters to align with page boundaries.
5
+ * - Start index is decreased to the start of the page
6
+ * - End index is increased to the end of the page (capped by rowCount - 1 if defined)
7
+ */
8
+ export const adjustRowParams = (params, options) => {
9
+ if (typeof params.start !== 'number') {
10
+ return params;
11
+ }
12
+ const {
13
+ pageSize,
14
+ rowCount
15
+ } = options;
16
+ const adjustedStart = params.start - params.start % pageSize;
17
+ const pageAlignedEnd = params.end + pageSize - params.end % pageSize - 1;
18
+ // rowCount of -1 means "unknown/infinite", treat same as undefined (no capping)
19
+ const maxEnd = rowCount !== undefined && rowCount !== -1 ? Math.max(0, rowCount - 1) : Infinity;
20
+ return _extends({}, params, {
21
+ start: adjustedStart,
22
+ end: Math.min(maxEnd, pageAlignedEnd)
23
+ });
24
+ };
2
25
  export const findSkeletonRowsSection = ({
3
26
  apiRef,
4
27
  visibleRows,
@@ -7,7 +7,7 @@ import useEventCallback from '@mui/utils/useEventCallback';
7
7
  import debounce from '@mui/utils/debounce';
8
8
  import { useGridEvent, gridSortModelSelector, gridFilterModelSelector, GRID_ROOT_GROUP_ID, gridPaginationModelSelector, gridFilteredSortedRowIdsSelector, gridRowIdSelector } from '@mui/x-data-grid';
9
9
  import { getVisibleRows, gridRenderContextSelector, GridStrategyGroup, useGridRegisterStrategyProcessor, runIf, DataSourceRowsUpdateStrategy } from '@mui/x-data-grid/internals';
10
- import { findSkeletonRowsSection } from "../lazyLoader/utils.js";
10
+ import { findSkeletonRowsSection, adjustRowParams } from "../lazyLoader/utils.js";
11
11
  import { GRID_SKELETON_ROW_ROOT_ID } from "../lazyLoader/useGridLazyLoaderPreProcessors.js";
12
12
  var LoadingTrigger = /*#__PURE__*/function (LoadingTrigger) {
13
13
  LoadingTrigger[LoadingTrigger["VIEWPORT"] = 0] = "VIEWPORT";
@@ -39,19 +39,6 @@ export const useGridDataSourceLazyLoader = (privateApiRef, props) => {
39
39
  privateApiRef.current.dataSource.fetchRows(GRID_ROOT_GROUP_ID, params);
40
40
  }, [privateApiRef]);
41
41
  const debouncedFetchRows = React.useMemo(() => debounce(fetchRows, 0), [fetchRows]);
42
-
43
- // Adjust the render context range to fit the pagination model's page size
44
- // First row index should be decreased to the start of the page, end row index should be increased to the end of the page
45
- const adjustRowParams = React.useCallback(params => {
46
- if (typeof params.start !== 'number') {
47
- return params;
48
- }
49
- const paginationModel = gridPaginationModelSelector(privateApiRef);
50
- return _extends({}, params, {
51
- start: params.start - params.start % paginationModel.pageSize,
52
- end: params.end + paginationModel.pageSize - params.end % paginationModel.pageSize - 1
53
- });
54
- }, [privateApiRef]);
55
42
  const resetGrid = React.useCallback(() => {
56
43
  privateApiRef.current.setLoading(true);
57
44
  privateApiRef.current.dataSource.cache.clear();
@@ -102,9 +89,13 @@ export const useGridDataSourceLazyLoader = (privateApiRef, props) => {
102
89
  if (rootChildrenCount === 0) {
103
90
  return;
104
91
  }
92
+ const paginationModel = gridPaginationModelSelector(privateApiRef);
105
93
  const pageToSkip = adjustRowParams({
106
94
  start: renderedRowsIntervalCache.current.firstRowToRender,
107
95
  end: renderedRowsIntervalCache.current.lastRowToRender
96
+ }, {
97
+ pageSize: paginationModel.pageSize,
98
+ rowCount: pageRowCount
108
99
  });
109
100
  let hasChanged = false;
110
101
  const isInitialPage = renderedRowsIntervalCache.current.firstRowToRender === 0 && renderedRowsIntervalCache.current.lastRowToRender === 0;
@@ -157,7 +148,7 @@ export const useGridDataSourceLazyLoader = (privateApiRef, props) => {
157
148
  tree
158
149
  })
159
150
  }), 'addSkeletonRows');
160
- }, [privateApiRef, adjustRowParams]);
151
+ }, [privateApiRef]);
161
152
  const updateLoadingTrigger = React.useCallback(rowCount => {
162
153
  const newLoadingTrigger = rowCount === -1 ? LoadingTrigger.SCROLL_END : LoadingTrigger.VIEWPORT;
163
154
  if (loadingTrigger.current !== null) {
@@ -268,43 +259,47 @@ export const useGridDataSourceLazyLoader = (privateApiRef, props) => {
268
259
  filterModel
269
260
  };
270
261
  privateApiRef.current.setLoading(true);
271
- fetchRows(adjustRowParams(getRowsParams));
262
+ fetchRows(adjustRowParams(getRowsParams, {
263
+ pageSize: paginationModel.pageSize,
264
+ rowCount: privateApiRef.current.state.pagination.rowCount
265
+ }));
272
266
  });
273
- const handleRenderedRowsIntervalChange = React.useCallback(params => {
267
+ const handleRenderedRowsIntervalChange = React.useCallback(renderContext => {
274
268
  if (rowsStale.current) {
275
269
  return;
276
270
  }
277
271
  const sortModel = gridSortModelSelector(privateApiRef);
278
272
  const filterModel = gridFilterModelSelector(privateApiRef);
279
273
  const getRowsParams = {
280
- start: params.firstRowIndex,
281
- end: params.lastRowIndex - 1,
274
+ start: renderContext.firstRowIndex,
275
+ end: renderContext.lastRowIndex - 1,
282
276
  sortModel,
283
277
  filterModel
284
278
  };
285
- if (renderedRowsIntervalCache.current.firstRowToRender === params.firstRowIndex && renderedRowsIntervalCache.current.lastRowToRender === params.lastRowIndex) {
279
+ if (renderedRowsIntervalCache.current.firstRowToRender === renderContext.firstRowIndex && renderedRowsIntervalCache.current.lastRowToRender === renderContext.lastRowIndex) {
286
280
  return;
287
281
  }
288
282
  renderedRowsIntervalCache.current = {
289
- firstRowToRender: params.firstRowIndex,
290
- lastRowToRender: params.lastRowIndex
283
+ firstRowToRender: renderContext.firstRowIndex,
284
+ lastRowToRender: renderContext.lastRowIndex
291
285
  };
292
286
  const currentVisibleRows = getVisibleRows(privateApiRef);
293
287
  const skeletonRowsSection = findSkeletonRowsSection({
294
288
  apiRef: privateApiRef,
295
289
  visibleRows: currentVisibleRows.rows,
296
- range: {
297
- firstRowIndex: params.firstRowIndex,
298
- lastRowIndex: params.lastRowIndex - 1
299
- }
290
+ range: renderContext
300
291
  });
301
292
  if (!skeletonRowsSection) {
302
293
  return;
303
294
  }
304
295
  getRowsParams.start = skeletonRowsSection.firstRowIndex;
305
296
  getRowsParams.end = skeletonRowsSection.lastRowIndex;
306
- fetchRows(adjustRowParams(getRowsParams));
307
- }, [privateApiRef, adjustRowParams, fetchRows]);
297
+ const paginationModel = gridPaginationModelSelector(privateApiRef);
298
+ fetchRows(adjustRowParams(getRowsParams, {
299
+ pageSize: paginationModel.pageSize,
300
+ rowCount: privateApiRef.current.state.pagination.rowCount
301
+ }));
302
+ }, [privateApiRef, fetchRows]);
308
303
  const throttledHandleRenderedRowsIntervalChange = React.useMemo(() => throttle(handleRenderedRowsIntervalChange, props.lazyLoadingRequestThrottleMs), [props.lazyLoadingRequestThrottleMs, handleRenderedRowsIntervalChange]);
309
304
  React.useEffect(() => {
310
305
  return () => {
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { useGridSelector, useGridApiMethod, gridDimensionsSelector } from '@mui/x-data-grid';
5
5
  import { useTimeout, gridHorizontalScrollbarHeightSelector } from '@mui/x-data-grid/internals';
6
6
  import useEventCallback from '@mui/utils/useEventCallback';
7
- import { styled } from '@mui/system';
7
+ import { styled } from '@mui/material/styles';
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  const InfiniteLoadingTriggerElement = styled('div', {
10
10
  slot: 'internal',
@@ -9,5 +9,8 @@ export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
9
9
  /**
10
10
  * Retrieves the parent path for a row from the previous tree state.
11
11
  * Used during full tree updates to maintain correct hierarchy.
12
+ *
13
+ * Uses the parent node's `path` property, which stores the group keys
14
+ * representing the full path to the parent (i.e. the keys used to fetch the current node).
12
15
  */
13
16
  export declare function getParentPath(rowId: GridRowId, treeCreationParams: GridRowTreeCreationParams): string[];
@@ -20,10 +20,22 @@ export function skipSorting(rowTree) {
20
20
  /**
21
21
  * Retrieves the parent path for a row from the previous tree state.
22
22
  * Used during full tree updates to maintain correct hierarchy.
23
+ *
24
+ * Uses the parent node's `path` property, which stores the group keys
25
+ * representing the full path to the parent (i.e. the keys used to fetch the current node).
23
26
  */
24
27
  export function getParentPath(rowId, treeCreationParams) {
25
- if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1 || !('path' in treeCreationParams.previousTree[rowId])) {
28
+ if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1) {
26
29
  return [];
27
30
  }
28
- return treeCreationParams.previousTree[rowId].path || [];
31
+ const node = treeCreationParams.previousTree[rowId];
32
+ const parentId = node.parent;
33
+ if (parentId == null) {
34
+ return [];
35
+ }
36
+ const parentNode = treeCreationParams.previousTree[parentId];
37
+ if (parentNode && 'path' in parentNode) {
38
+ return parentNode.path || [];
39
+ }
40
+ return [];
29
41
  }
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.27.0
2
+ * @mui/x-data-grid-pro v9.0.0-alpha.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
@@ -112,7 +112,11 @@ const useGridColumnPinning = (apiRef, props) => {
112
112
  const stateRestorePreProcessing = React.useCallback((params, context) => {
113
113
  const newPinnedColumns = context.stateToRestore.pinnedColumns;
114
114
  if (newPinnedColumns != null) {
115
+ apiRef.current.caches.columnPinning.orderedFieldsBeforePinningColumns = null;
115
116
  setState(apiRef, newPinnedColumns);
117
+ return (0, _extends2.default)({}, params, {
118
+ callbacks: [...params.callbacks, () => apiRef.current.requestPipeProcessorsApplication('hydrateColumns')]
119
+ });
116
120
  }
117
121
  return params;
118
122
  }, [apiRef]);
@@ -1,6 +1,23 @@
1
1
  import type { RefObject } from '@mui/x-internals/types';
2
2
  import { type GridRowEntry } from '@mui/x-data-grid';
3
3
  import type { GridPrivateApiPro } from "../../../models/gridApiPro.js";
4
+ interface GridRowRenderContext {
5
+ firstRowIndex: number;
6
+ lastRowIndex: number;
7
+ }
8
+ interface AdjustRowParamsOptions {
9
+ pageSize: number;
10
+ rowCount: number | undefined;
11
+ }
12
+ /**
13
+ * Adjusts the row fetch parameters to align with page boundaries.
14
+ * - Start index is decreased to the start of the page
15
+ * - End index is increased to the end of the page (capped by rowCount - 1 if defined)
16
+ */
17
+ export declare const adjustRowParams: <T extends {
18
+ start: number | string;
19
+ end: number;
20
+ }>(params: T, options: AdjustRowParamsOptions) => T;
4
21
  export declare const findSkeletonRowsSection: ({
5
22
  apiRef,
6
23
  visibleRows,
@@ -8,11 +25,9 @@ export declare const findSkeletonRowsSection: ({
8
25
  }: {
9
26
  apiRef: RefObject<GridPrivateApiPro>;
10
27
  visibleRows: GridRowEntry[];
11
- range: {
12
- firstRowIndex: number;
13
- lastRowIndex: number;
14
- };
28
+ range: GridRowRenderContext;
15
29
  }) => {
16
30
  firstRowIndex: number;
17
31
  lastRowIndex: number;
18
- } | undefined;
32
+ } | undefined;
33
+ export {};
@@ -1,10 +1,35 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
- exports.findSkeletonRowsSection = void 0;
7
+ exports.findSkeletonRowsSection = exports.adjustRowParams = void 0;
8
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
9
  var _xDataGrid = require("@mui/x-data-grid");
10
+ /**
11
+ * Adjusts the row fetch parameters to align with page boundaries.
12
+ * - Start index is decreased to the start of the page
13
+ * - End index is increased to the end of the page (capped by rowCount - 1 if defined)
14
+ */
15
+ const adjustRowParams = (params, options) => {
16
+ if (typeof params.start !== 'number') {
17
+ return params;
18
+ }
19
+ const {
20
+ pageSize,
21
+ rowCount
22
+ } = options;
23
+ const adjustedStart = params.start - params.start % pageSize;
24
+ const pageAlignedEnd = params.end + pageSize - params.end % pageSize - 1;
25
+ // rowCount of -1 means "unknown/infinite", treat same as undefined (no capping)
26
+ const maxEnd = rowCount !== undefined && rowCount !== -1 ? Math.max(0, rowCount - 1) : Infinity;
27
+ return (0, _extends2.default)({}, params, {
28
+ start: adjustedStart,
29
+ end: Math.min(maxEnd, pageAlignedEnd)
30
+ });
31
+ };
32
+ exports.adjustRowParams = adjustRowParams;
8
33
  const findSkeletonRowsSection = ({
9
34
  apiRef,
10
35
  visibleRows,
@@ -46,19 +46,6 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
46
46
  privateApiRef.current.dataSource.fetchRows(_xDataGrid.GRID_ROOT_GROUP_ID, params);
47
47
  }, [privateApiRef]);
48
48
  const debouncedFetchRows = React.useMemo(() => (0, _debounce.default)(fetchRows, 0), [fetchRows]);
49
-
50
- // Adjust the render context range to fit the pagination model's page size
51
- // First row index should be decreased to the start of the page, end row index should be increased to the end of the page
52
- const adjustRowParams = React.useCallback(params => {
53
- if (typeof params.start !== 'number') {
54
- return params;
55
- }
56
- const paginationModel = (0, _xDataGrid.gridPaginationModelSelector)(privateApiRef);
57
- return (0, _extends2.default)({}, params, {
58
- start: params.start - params.start % paginationModel.pageSize,
59
- end: params.end + paginationModel.pageSize - params.end % paginationModel.pageSize - 1
60
- });
61
- }, [privateApiRef]);
62
49
  const resetGrid = React.useCallback(() => {
63
50
  privateApiRef.current.setLoading(true);
64
51
  privateApiRef.current.dataSource.cache.clear();
@@ -109,9 +96,13 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
109
96
  if (rootChildrenCount === 0) {
110
97
  return;
111
98
  }
112
- const pageToSkip = adjustRowParams({
99
+ const paginationModel = (0, _xDataGrid.gridPaginationModelSelector)(privateApiRef);
100
+ const pageToSkip = (0, _utils.adjustRowParams)({
113
101
  start: renderedRowsIntervalCache.current.firstRowToRender,
114
102
  end: renderedRowsIntervalCache.current.lastRowToRender
103
+ }, {
104
+ pageSize: paginationModel.pageSize,
105
+ rowCount: pageRowCount
115
106
  });
116
107
  let hasChanged = false;
117
108
  const isInitialPage = renderedRowsIntervalCache.current.firstRowToRender === 0 && renderedRowsIntervalCache.current.lastRowToRender === 0;
@@ -164,7 +155,7 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
164
155
  tree
165
156
  })
166
157
  }), 'addSkeletonRows');
167
- }, [privateApiRef, adjustRowParams]);
158
+ }, [privateApiRef]);
168
159
  const updateLoadingTrigger = React.useCallback(rowCount => {
169
160
  const newLoadingTrigger = rowCount === -1 ? LoadingTrigger.SCROLL_END : LoadingTrigger.VIEWPORT;
170
161
  if (loadingTrigger.current !== null) {
@@ -275,43 +266,47 @@ const useGridDataSourceLazyLoader = (privateApiRef, props) => {
275
266
  filterModel
276
267
  };
277
268
  privateApiRef.current.setLoading(true);
278
- fetchRows(adjustRowParams(getRowsParams));
269
+ fetchRows((0, _utils.adjustRowParams)(getRowsParams, {
270
+ pageSize: paginationModel.pageSize,
271
+ rowCount: privateApiRef.current.state.pagination.rowCount
272
+ }));
279
273
  });
280
- const handleRenderedRowsIntervalChange = React.useCallback(params => {
274
+ const handleRenderedRowsIntervalChange = React.useCallback(renderContext => {
281
275
  if (rowsStale.current) {
282
276
  return;
283
277
  }
284
278
  const sortModel = (0, _xDataGrid.gridSortModelSelector)(privateApiRef);
285
279
  const filterModel = (0, _xDataGrid.gridFilterModelSelector)(privateApiRef);
286
280
  const getRowsParams = {
287
- start: params.firstRowIndex,
288
- end: params.lastRowIndex - 1,
281
+ start: renderContext.firstRowIndex,
282
+ end: renderContext.lastRowIndex - 1,
289
283
  sortModel,
290
284
  filterModel
291
285
  };
292
- if (renderedRowsIntervalCache.current.firstRowToRender === params.firstRowIndex && renderedRowsIntervalCache.current.lastRowToRender === params.lastRowIndex) {
286
+ if (renderedRowsIntervalCache.current.firstRowToRender === renderContext.firstRowIndex && renderedRowsIntervalCache.current.lastRowToRender === renderContext.lastRowIndex) {
293
287
  return;
294
288
  }
295
289
  renderedRowsIntervalCache.current = {
296
- firstRowToRender: params.firstRowIndex,
297
- lastRowToRender: params.lastRowIndex
290
+ firstRowToRender: renderContext.firstRowIndex,
291
+ lastRowToRender: renderContext.lastRowIndex
298
292
  };
299
293
  const currentVisibleRows = (0, _internals.getVisibleRows)(privateApiRef);
300
294
  const skeletonRowsSection = (0, _utils.findSkeletonRowsSection)({
301
295
  apiRef: privateApiRef,
302
296
  visibleRows: currentVisibleRows.rows,
303
- range: {
304
- firstRowIndex: params.firstRowIndex,
305
- lastRowIndex: params.lastRowIndex - 1
306
- }
297
+ range: renderContext
307
298
  });
308
299
  if (!skeletonRowsSection) {
309
300
  return;
310
301
  }
311
302
  getRowsParams.start = skeletonRowsSection.firstRowIndex;
312
303
  getRowsParams.end = skeletonRowsSection.lastRowIndex;
313
- fetchRows(adjustRowParams(getRowsParams));
314
- }, [privateApiRef, adjustRowParams, fetchRows]);
304
+ const paginationModel = (0, _xDataGrid.gridPaginationModelSelector)(privateApiRef);
305
+ fetchRows((0, _utils.adjustRowParams)(getRowsParams, {
306
+ pageSize: paginationModel.pageSize,
307
+ rowCount: privateApiRef.current.state.pagination.rowCount
308
+ }));
309
+ }, [privateApiRef, fetchRows]);
315
310
  const throttledHandleRenderedRowsIntervalChange = React.useMemo(() => (0, _throttle.throttle)(handleRenderedRowsIntervalChange, props.lazyLoadingRequestThrottleMs), [props.lazyLoadingRequestThrottleMs, handleRenderedRowsIntervalChange]);
316
311
  React.useEffect(() => {
317
312
  return () => {
@@ -11,9 +11,9 @@ var React = _interopRequireWildcard(require("react"));
11
11
  var _xDataGrid = require("@mui/x-data-grid");
12
12
  var _internals = require("@mui/x-data-grid/internals");
13
13
  var _useEventCallback = _interopRequireDefault(require("@mui/utils/useEventCallback"));
14
- var _system = require("@mui/system");
14
+ var _styles = require("@mui/material/styles");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
16
- const InfiniteLoadingTriggerElement = (0, _system.styled)('div', {
16
+ const InfiniteLoadingTriggerElement = (0, _styles.styled)('div', {
17
17
  slot: 'internal',
18
18
  shouldForwardProp: undefined
19
19
  })({
@@ -9,5 +9,8 @@ export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
9
9
  /**
10
10
  * Retrieves the parent path for a row from the previous tree state.
11
11
  * Used during full tree updates to maintain correct hierarchy.
12
+ *
13
+ * Uses the parent node's `path` property, which stores the group keys
14
+ * representing the full path to the parent (i.e. the keys used to fetch the current node).
12
15
  */
13
16
  export declare function getParentPath(rowId: GridRowId, treeCreationParams: GridRowTreeCreationParams): string[];
@@ -28,10 +28,22 @@ function skipSorting(rowTree) {
28
28
  /**
29
29
  * Retrieves the parent path for a row from the previous tree state.
30
30
  * Used during full tree updates to maintain correct hierarchy.
31
+ *
32
+ * Uses the parent node's `path` property, which stores the group keys
33
+ * representing the full path to the parent (i.e. the keys used to fetch the current node).
31
34
  */
32
35
  function getParentPath(rowId, treeCreationParams) {
33
- if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1 || !('path' in treeCreationParams.previousTree[rowId])) {
36
+ if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1) {
34
37
  return [];
35
38
  }
36
- return treeCreationParams.previousTree[rowId].path || [];
39
+ const node = treeCreationParams.previousTree[rowId];
40
+ const parentId = node.parent;
41
+ if (parentId == null) {
42
+ return [];
43
+ }
44
+ const parentNode = treeCreationParams.previousTree[parentId];
45
+ if (parentNode && 'path' in parentNode) {
46
+ return parentNode.path || [];
47
+ }
48
+ return [];
37
49
  }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v8.27.0
2
+ * @mui/x-data-grid-pro v9.0.0-alpha.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.27.0",
3
+ "version": "9.0.0-alpha.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",
@@ -33,13 +33,13 @@
33
33
  "directory": "packages/x-data-grid-pro"
34
34
  },
35
35
  "dependencies": {
36
- "@babel/runtime": "^7.28.4",
37
- "@mui/utils": "^7.3.5",
36
+ "@babel/runtime": "^7.28.6",
37
+ "@mui/utils": "^7.3.7",
38
38
  "clsx": "^2.1.1",
39
39
  "prop-types": "^15.8.1",
40
- "@mui/x-internals": "8.26.0",
41
- "@mui/x-data-grid": "8.27.0",
42
- "@mui/x-license": "8.26.0"
40
+ "@mui/x-internals": "9.0.0-alpha.0",
41
+ "@mui/x-data-grid": "9.0.0-alpha.0",
42
+ "@mui/x-license": "9.0.0-alpha.0"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "@emotion/react": "^11.9.0",