@mui/x-data-grid-pro 8.6.0 → 8.8.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 +202 -1
- package/DataGridPro/DataGridPro.js +1 -1
- package/components/headerFiltering/GridHeaderFilterCell.js +1 -0
- package/esm/DataGridPro/DataGridPro.js +1 -1
- package/esm/components/headerFiltering/GridHeaderFilterCell.js +2 -0
- package/esm/hooks/features/columnPinning/useGridColumnPinning.js +2 -0
- package/esm/hooks/features/columnReorder/useGridColumnReorder.js +2 -0
- package/esm/hooks/features/dataSource/useGridDataSourceBasePro.js +2 -0
- package/esm/hooks/features/dataSource/useGridDataSourcePro.js +2 -0
- package/esm/hooks/features/detailPanel/useGridDetailPanel.js +2 -0
- package/esm/hooks/features/rowPinning/useGridRowPinning.js +2 -0
- package/esm/hooks/features/rowReorder/useGridRowReorder.js +2 -0
- package/esm/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js +2 -0
- package/esm/hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.js +2 -0
- package/esm/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +4 -2
- package/esm/hooks/features/serverSideTreeData/utils.d.ts +7 -1
- package/esm/hooks/features/serverSideTreeData/utils.js +11 -0
- package/esm/hooks/features/treeData/useGridTreeDataPreProcessors.js +2 -0
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +4 -1
- package/esm/internals/index.js +4 -3
- package/hooks/features/columnPinning/useGridColumnPinning.js +1 -0
- package/hooks/features/columnReorder/useGridColumnReorder.js +1 -0
- package/hooks/features/dataSource/useGridDataSourceBasePro.js +1 -0
- package/hooks/features/dataSource/useGridDataSourcePro.js +1 -0
- package/hooks/features/detailPanel/useGridDetailPanel.js +1 -0
- package/hooks/features/rowPinning/useGridRowPinning.js +1 -0
- package/hooks/features/rowReorder/useGridRowReorder.js +1 -0
- package/hooks/features/serverSideLazyLoader/useGridDataSourceLazyLoader.js +1 -0
- package/hooks/features/serverSideLazyLoader/useGridInfiniteLoadingIntersection.js +1 -0
- package/hooks/features/serverSideTreeData/useGridDataSourceTreeDataPreProcessors.js +2 -1
- package/hooks/features/serverSideTreeData/utils.d.ts +7 -1
- package/hooks/features/serverSideTreeData/utils.js +12 -0
- package/hooks/features/treeData/useGridTreeDataPreProcessors.js +1 -0
- package/index.js +1 -1
- package/internals/index.d.ts +4 -1
- package/internals/index.js +8 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,207 @@
|
|
|
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.8.0
|
|
9
|
+
|
|
10
|
+
_Jul 11, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Chart zoom preview can be enabled
|
|
15
|
+
|
|
16
|
+
<img width="758" alt="chart with x-axis preview" src="https://github.com/user-attachments/assets/50ce6f61-16dc-4e9b-a727-ca65d80927d7" />
|
|
17
|
+
|
|
18
|
+
- 🌎 Add Indonesian (id-ID) locale on the Data Grid
|
|
19
|
+
|
|
20
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
21
|
+
@kennarddh
|
|
22
|
+
|
|
23
|
+
The following are all team members who have contributed to this release:
|
|
24
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@8.8.0`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Fix `useGridSelector` missing subscription in `React.StrictMode` (#18676) @cherniavskii
|
|
31
|
+
- [DataGrid] Fix scrollbar filler `z-index` (#18688) @KenanYusuf
|
|
32
|
+
- [DataGrid] Set correct data source cache chunk size when pagination is disabled (#18636) @arminmeh
|
|
33
|
+
- [l10n] Add Indonesian (id-ID) locale (#18710) @kennarddh
|
|
34
|
+
|
|
35
|
+
#### `@mui/x-data-grid-pro@8.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
36
|
+
|
|
37
|
+
Same changes as in `@mui/x-data-grid@8.8.0`, plus:
|
|
38
|
+
|
|
39
|
+
- [DataGridPro] Fix row ordering not auto-scrolling when moving beyond viewport (#18557) @MBilalShafi
|
|
40
|
+
- [DataGridPro] Set correct parent paths when tree is refreshed with data source tree data and row grouping (#18715) @arminmeh
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-premium@8.8.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid-pro@8.8.0`.
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.8.0`
|
|
49
|
+
|
|
50
|
+
Internal changes.
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@8.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@8.8.0`.
|
|
55
|
+
|
|
56
|
+
### Charts
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-charts@8.8.0`
|
|
59
|
+
|
|
60
|
+
- [charts] Add control to the axis highlight (#17900) @alexfauquette
|
|
61
|
+
- [charts] Avoid processing area plot data if area isn't used in series (#18712) @bernardobelchior
|
|
62
|
+
- [charts] Make smarter default domain limit (#18506) @alexfauquette
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-charts-pro@8.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-charts@8.8.0`, plus:
|
|
67
|
+
|
|
68
|
+
- [charts-pro] Add `funnelDirection` to control pyramid direction (#18568) @JCQuintas
|
|
69
|
+
- [charts-pro] Add `onBeforeExport` callback (#18722) @bernardobelchior
|
|
70
|
+
- [charts-pro] Add chart zoom preview (#18267) @bernardobelchior
|
|
71
|
+
- [charts-pro] Allow customizing scatter preview marker size (#18726) @bernardobelchior
|
|
72
|
+
- [charts-pro] Allow disabling the copy of styles in charts export (#18753) @bernardobelchior
|
|
73
|
+
|
|
74
|
+
### Tree View
|
|
75
|
+
|
|
76
|
+
#### `@mui/x-tree-view@8.8.0`
|
|
77
|
+
|
|
78
|
+
- [tree view] Fix state update that caused scrolling bug when lazy loading and `checkboxSelection` are enabled (#18749) @rita-codes
|
|
79
|
+
|
|
80
|
+
#### `@mui/x-tree-view-pro@8.8.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
81
|
+
|
|
82
|
+
Same changes as in `@mui/x-tree-view@8.8.0`.
|
|
83
|
+
|
|
84
|
+
### Codemod
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-codemod@8.8.0`
|
|
87
|
+
|
|
88
|
+
Internal changes.
|
|
89
|
+
|
|
90
|
+
### Docs
|
|
91
|
+
|
|
92
|
+
- [docs] Add standalone Pyramid chart page to improve SEO (#18527) @prakhargupta1
|
|
93
|
+
- [docs] Add example to customise line interaction (#18539) @alexfauquette
|
|
94
|
+
- [docs] Fix `size` column filtering in files tree demo (#17952) @cherniavskii
|
|
95
|
+
- [docs] Generate `llms.txt` for X and their products (#18595) @siriwatknp
|
|
96
|
+
- [docs] Improve bar chart demos on mobile (#18721) @alexfauquette
|
|
97
|
+
- [docs] Refine charts overview page (#17447) @noraleonte
|
|
98
|
+
|
|
99
|
+
### Miscellaneous
|
|
100
|
+
|
|
101
|
+
- [code-infra] Ensure all `@mui/*` packages are picked by `Material UI` renovate group (#18711) @LukasTy
|
|
102
|
+
- [code-infra] Fix broken CI (#18716) @LukasTy
|
|
103
|
+
- [code-infra] Refactor `prettier` config resolving (#18720) @LukasTy
|
|
104
|
+
- [test] Increase data points in chart benchmarks (#18714) @bernardobelchior
|
|
105
|
+
|
|
106
|
+
## 8.7.0
|
|
107
|
+
|
|
108
|
+
_Jul 4, 2025_
|
|
109
|
+
|
|
110
|
+
We'd like to extend a big thank you to the 15 contributors who made this release possible. Here are some highlights ✨:
|
|
111
|
+
|
|
112
|
+
- 📊 Add `useChartProApiRef` for easier access to the API
|
|
113
|
+
- 📆 Support different start and end `referenceDate` props on range components
|
|
114
|
+
- 📚 Documentation improvements
|
|
115
|
+
- 🐞 Bugfixes
|
|
116
|
+
- 🌎 Improve Greek (el-GR) translations on the Charts
|
|
117
|
+
- 🌎 Improve Danish (da-DK) locale on the Data Grid
|
|
118
|
+
|
|
119
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
120
|
+
@ShahrazH, @vadimkuragkovskiy, @whythecode
|
|
121
|
+
|
|
122
|
+
The following are all team members who have contributed to this release:
|
|
123
|
+
@alexfauquette, @brijeshb42, @mapache-salvaje, @arminmeh, @bernardobelchior, @bharatkashyap, @Janpot, @JCQuintas, @KenanYusuf, @LukasTy, @michelengelen, @rita-codes
|
|
124
|
+
|
|
125
|
+
### Data Grid
|
|
126
|
+
|
|
127
|
+
#### `@mui/x-data-grid@8.7.0`
|
|
128
|
+
|
|
129
|
+
- [DataGrid] Fix column state restore with controlled column visibility model (#18567) @arminmeh
|
|
130
|
+
- [DataGrid] Fix styling virtualized column headers (#18603) @KenanYusuf
|
|
131
|
+
- [l10n] Improve Danish (da-DK) locale (#18537) @ShahrazH
|
|
132
|
+
|
|
133
|
+
#### `@mui/x-data-grid-pro@8.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
134
|
+
|
|
135
|
+
Same changes as in `@mui/x-data-grid@8.7.0`.
|
|
136
|
+
|
|
137
|
+
#### `@mui/x-data-grid-premium@8.7.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
138
|
+
|
|
139
|
+
Same changes as in `@mui/x-data-grid-pro@8.7.0`.
|
|
140
|
+
|
|
141
|
+
### Date and Time Pickers
|
|
142
|
+
|
|
143
|
+
#### `@mui/x-date-pickers@8.7.0`
|
|
144
|
+
|
|
145
|
+
- [pickers] Support different `start` and `end` `referenceDate` props on range components (#18549) @LukasTy
|
|
146
|
+
|
|
147
|
+
#### `@mui/x-date-pickers-pro@8.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
148
|
+
|
|
149
|
+
Same changes as in `@mui/x-date-pickers@8.7.0`.
|
|
150
|
+
|
|
151
|
+
### Charts
|
|
152
|
+
|
|
153
|
+
#### `@mui/x-charts@8.7.0`
|
|
154
|
+
|
|
155
|
+
- [charts] Export `ChartsReferenceLineProps` (#18598) @bernardobelchior
|
|
156
|
+
- [charts] Extract bar and line plot logic into reusable hooks (#18541) @bernardobelchior
|
|
157
|
+
- [charts] Extract plot logic into separate files for reuse (#18522) @bernardobelchior
|
|
158
|
+
- [charts] Profile charts benchmarks using chromium (#18528) @bernardobelchior
|
|
159
|
+
- [l10n] Add Greek (el-GR) locale to charts (#18548) @whythecode
|
|
160
|
+
|
|
161
|
+
#### `@mui/x-charts-pro@8.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
162
|
+
|
|
163
|
+
Same changes as in `@mui/x-charts@8.7.0`, plus:
|
|
164
|
+
|
|
165
|
+
- [charts-pro] Add `useChartProApiRef` for easier refs (#18013) @JCQuintas
|
|
166
|
+
- [charts-pro] Add tests and classes to zoom slider (#18660) @JCQuintas
|
|
167
|
+
- [charts-pro] Fix geometry not handling gestures in specific scenarios (#18651) @JCQuintas
|
|
168
|
+
- [charts-pro] Rename `useChartApiContext` to `useChartProApiContext` (#18565) @JCQuintas
|
|
169
|
+
- [charts-pro] Zoom pointer improvements (#17480) @JCQuintas
|
|
170
|
+
|
|
171
|
+
### Tree View
|
|
172
|
+
|
|
173
|
+
#### `@mui/x-tree-view@8.7.0`
|
|
174
|
+
|
|
175
|
+
Internal changes.
|
|
176
|
+
|
|
177
|
+
#### `@mui/x-tree-view-pro@8.7.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
178
|
+
|
|
179
|
+
Same changes as in `@mui/x-tree-view@8.7.0`, plus:
|
|
180
|
+
|
|
181
|
+
- [tree view pro] Add missing `dataSource` JSDoc (#18650) @LukasTy
|
|
182
|
+
|
|
183
|
+
### Docs
|
|
184
|
+
|
|
185
|
+
- [docs] Add MCP stub (#18204) @bharatkashyap
|
|
186
|
+
- [docs] Fix AI Assistant proxy rewrite prefix (#18661) @arminmeh
|
|
187
|
+
- [docs] Improve test README.MD (#18634) @LukasTy
|
|
188
|
+
- [docs] Provide workaround for pie chart composition (#18600) @alexfauquette
|
|
189
|
+
- [docs][charts] Add donut chart as a special case of a pie chart (#18652) @bernardobelchior
|
|
190
|
+
- [docs][charts] Centralize country and continent data (#18604) @bernardobelchior
|
|
191
|
+
- [docs][data grid] Audit and revise the Pro row docs (#17926) @mapache-salvaje
|
|
192
|
+
- [docs][pickers] Add mention of theme augmentation in relevant migration section (#18608) @LukasTy
|
|
193
|
+
|
|
194
|
+
### Core
|
|
195
|
+
|
|
196
|
+
- [core] Avoid stringifying `document` object (#18657) @vadimkuragkovskiy
|
|
197
|
+
|
|
198
|
+
### Miscellaneous
|
|
199
|
+
|
|
200
|
+
- [code-infra] Bump code-infra version and fix breaking changes (#18653) @brijeshb42
|
|
201
|
+
- [code-infra] Ensure `material-ui/disallow-react-api-in-server-components` ESLint rule is applied (#18570) @LukasTy
|
|
202
|
+
- [code-infra] Migrate to flat eslint config (#18562) @brijeshb42
|
|
203
|
+
- [code-infra] Refactor eslint config (#18643) @LukasTy
|
|
204
|
+
- [infra] Add renovatebot rule for latest infra packages (#18609) @Janpot
|
|
205
|
+
- [infra] Move pushArgos script to code-infra (#18667) @Janpot
|
|
206
|
+
- [infra] Updates release script to fetch latest major version from upstream (#18552) @michelengelen
|
|
207
|
+
- [release] Add missing contributor to changelog (#18561) @bernardobelchior
|
|
208
|
+
|
|
8
209
|
## 8.6.0
|
|
9
210
|
|
|
10
211
|
_Jun 27, 2025_
|
|
@@ -19,7 +220,7 @@ We'd like to extend a big thank you to the 12 contributors who made this release
|
|
|
19
220
|
- 🌎 Improve German (de-DE) locale
|
|
20
221
|
|
|
21
222
|
Special thanks go out to the community members for their valuable contributions:
|
|
22
|
-
@ShahrazH, @vadimka123
|
|
223
|
+
@omalyutin, @ShahrazH, @vadimka123
|
|
23
224
|
|
|
24
225
|
The following are all team members who have contributed to this release:
|
|
25
226
|
@arminmeh, @bernardobelchior, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @sai6855
|
|
@@ -29,7 +29,7 @@ const configuration = {
|
|
|
29
29
|
useCellAggregationResult: () => null
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
|
-
const releaseInfo = "
|
|
32
|
+
const releaseInfo = "MTc1MjE4NDgwMDAwMA==";
|
|
33
33
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
34
34
|
packageName: "x-data-grid-pro",
|
|
35
35
|
releaseInfo: releaseInfo
|
|
@@ -22,7 +22,7 @@ const configuration = {
|
|
|
22
22
|
useCellAggregationResult: () => null
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
|
-
const releaseInfo = "
|
|
25
|
+
const releaseInfo = "MTc1MjE4NDgwMDAwMA==";
|
|
26
26
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
27
27
|
packageName: "x-data-grid-pro",
|
|
28
28
|
releaseInfo: releaseInfo
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["colIndex", "height", "hasFocus", "width", "headerClassName", "colDef", "item", "headerFilterMenuRef", "InputComponentProps", "showClearIcon", "pinnedPosition", "pinnedOffset", "style", "showLeftBorder", "showRightBorder"];
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import * as React from 'react';
|
|
3
5
|
import { useGridSelector, gridVisibleColumnDefinitionsSelector, gridColumnsTotalWidthSelector, gridColumnPositionsSelector, useGridApiMethod, useGridEvent, GridPinnedColumnPosition, gridColumnFieldsSelector } from '@mui/x-data-grid';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import * as React from 'react';
|
|
2
4
|
import composeClasses from '@mui/utils/composeClasses';
|
|
3
5
|
import { useGridLogger, useGridEvent, getDataGridUtilityClass, useGridSelector, gridSortModelSelector, gridRowMaximumTreeDepthSelector, useGridEventPriority, gridRowNodeSelector } from '@mui/x-data-grid';
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
5
|
const _excluded = ["hideDescendantCount"];
|
|
@@ -5,7 +7,7 @@ import * as React from 'react';
|
|
|
5
7
|
import { gridRowTreeSelector, useFirstRender } from '@mui/x-data-grid';
|
|
6
8
|
import { GridStrategyGroup, useGridRegisterPipeProcessor, useGridRegisterStrategyProcessor } from '@mui/x-data-grid/internals';
|
|
7
9
|
import { GRID_TREE_DATA_GROUPING_COL_DEF, GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES } from "../treeData/gridTreeDataGroupColDef.js";
|
|
8
|
-
import { skipFiltering, skipSorting } from "./utils.js";
|
|
10
|
+
import { getParentPath, skipFiltering, skipSorting } from "./utils.js";
|
|
9
11
|
import { GridDataSourceTreeDataGroupingCell } from "../../../components/GridDataSourceTreeDataGroupingCell.js";
|
|
10
12
|
import { createRowTree } from "../../../utils/tree/createRowTree.js";
|
|
11
13
|
import { updateRowTree } from "../../../utils/tree/updateRowTree.js";
|
|
@@ -73,8 +75,8 @@ export const useGridDataSourceTreeDataPreProcessors = (privateApiRef, props) =>
|
|
|
73
75
|
if (!getChildrenCount) {
|
|
74
76
|
throw new Error('MUI X: No `getChildrenCount` method provided with the dataSource.');
|
|
75
77
|
}
|
|
76
|
-
const parentPath = params.updates.groupKeys ?? [];
|
|
77
78
|
const getRowTreeBuilderNode = rowId => {
|
|
79
|
+
const parentPath = params.updates.groupKeys ?? getParentPath(rowId, params);
|
|
78
80
|
const count = getChildrenCount(params.dataRowIdToModelLookup[rowId]);
|
|
79
81
|
return {
|
|
80
82
|
id: rowId,
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
+
import { GridRowTreeCreationParams } from '@mui/x-data-grid/internals';
|
|
2
3
|
export declare function skipFiltering(rowTree: GridRowTreeConfig): {
|
|
3
4
|
filteredRowsLookup: {};
|
|
4
5
|
filteredChildrenCountLookup: Record<GridRowId, number>;
|
|
5
6
|
filteredDescendantCountLookup: {};
|
|
6
7
|
};
|
|
7
|
-
export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
|
|
8
|
+
export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves the parent path for a row from the previous tree state.
|
|
11
|
+
* Used during full tree updates to maintain correct hierarchy.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getParentPath(rowId: GridRowId, treeCreationParams: GridRowTreeCreationParams): string[];
|
|
@@ -15,4 +15,15 @@ export function skipFiltering(rowTree) {
|
|
|
15
15
|
}
|
|
16
16
|
export function skipSorting(rowTree) {
|
|
17
17
|
return getTreeNodeDescendants(rowTree, GRID_ROOT_GROUP_ID, false);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Retrieves the parent path for a row from the previous tree state.
|
|
22
|
+
* Used during full tree updates to maintain correct hierarchy.
|
|
23
|
+
*/
|
|
24
|
+
export function getParentPath(rowId, treeCreationParams) {
|
|
25
|
+
if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1 || !('path' in treeCreationParams.previousTree[rowId])) {
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
return treeCreationParams.previousTree[rowId].path || [];
|
|
18
29
|
}
|
package/esm/index.js
CHANGED
package/esm/internals/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from '@mui/x-data-grid/internals';
|
|
2
2
|
export { GridColumnHeaders } from "../components/GridColumnHeaders.js";
|
|
3
3
|
export { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridProDefaultSlotsComponents.js";
|
|
4
|
+
/**
|
|
5
|
+
* x-data-grid-pro internals that are overriding the x-data-grid internals
|
|
6
|
+
*/
|
|
4
7
|
export { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
|
|
5
8
|
export { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
6
9
|
export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
@@ -31,5 +34,5 @@ export { updateRowTree } from "../utils/tree/updateRowTree.js";
|
|
|
31
34
|
export { sortRowTree } from "../utils/tree/sortRowTree.js";
|
|
32
35
|
export { insertNodeInTree, removeNodeFromTree, getVisibleRowsLookup } from "../utils/tree/utils.js";
|
|
33
36
|
export type { RowTreeBuilderGroupingCriterion } from "../utils/tree/models.js";
|
|
34
|
-
export { skipSorting, skipFiltering } from "../hooks/features/serverSideTreeData/utils.js";
|
|
37
|
+
export { skipSorting, skipFiltering, getParentPath } from "../hooks/features/serverSideTreeData/utils.js";
|
|
35
38
|
export * from "./propValidation.js";
|
package/esm/internals/index.js
CHANGED
|
@@ -3,13 +3,14 @@ export * from '@mui/x-data-grid/internals';
|
|
|
3
3
|
export { GridColumnHeaders } from "../components/GridColumnHeaders.js";
|
|
4
4
|
export { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridProDefaultSlotsComponents.js";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
7
|
* x-data-grid-pro internals that are overriding the x-data-grid internals
|
|
8
8
|
*/
|
|
9
|
+
/* eslint-disable import/export */
|
|
9
10
|
export { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
|
|
10
11
|
export { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
11
12
|
export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
12
|
-
|
|
13
|
+
/* eslint-enable import/export */
|
|
13
14
|
|
|
14
15
|
export { useGridColumnPinning, columnPinningStateInitializer } from "../hooks/features/columnPinning/useGridColumnPinning.js";
|
|
15
16
|
export { useGridColumnPinningPreProcessors } from "../hooks/features/columnPinning/useGridColumnPinningPreProcessors.js";
|
|
@@ -36,5 +37,5 @@ export { createRowTree } from "../utils/tree/createRowTree.js";
|
|
|
36
37
|
export { updateRowTree } from "../utils/tree/updateRowTree.js";
|
|
37
38
|
export { sortRowTree } from "../utils/tree/sortRowTree.js";
|
|
38
39
|
export { insertNodeInTree, removeNodeFromTree, getVisibleRowsLookup } from "../utils/tree/utils.js";
|
|
39
|
-
export { skipSorting, skipFiltering } from "../hooks/features/serverSideTreeData/utils.js";
|
|
40
|
+
export { skipSorting, skipFiltering, getParentPath } from "../hooks/features/serverSideTreeData/utils.js";
|
|
40
41
|
export * from "./propValidation.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
3
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
5
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
@@ -81,8 +82,8 @@ const useGridDataSourceTreeDataPreProcessors = (privateApiRef, props) => {
|
|
|
81
82
|
if (!getChildrenCount) {
|
|
82
83
|
throw new Error('MUI X: No `getChildrenCount` method provided with the dataSource.');
|
|
83
84
|
}
|
|
84
|
-
const parentPath = params.updates.groupKeys ?? [];
|
|
85
85
|
const getRowTreeBuilderNode = rowId => {
|
|
86
|
+
const parentPath = params.updates.groupKeys ?? (0, _utils.getParentPath)(rowId, params);
|
|
86
87
|
const count = getChildrenCount(params.dataRowIdToModelLookup[rowId]);
|
|
87
88
|
return {
|
|
88
89
|
id: rowId,
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { GridRowId, GridRowTreeConfig } from '@mui/x-data-grid';
|
|
2
|
+
import { GridRowTreeCreationParams } from '@mui/x-data-grid/internals';
|
|
2
3
|
export declare function skipFiltering(rowTree: GridRowTreeConfig): {
|
|
3
4
|
filteredRowsLookup: {};
|
|
4
5
|
filteredChildrenCountLookup: Record<GridRowId, number>;
|
|
5
6
|
filteredDescendantCountLookup: {};
|
|
6
7
|
};
|
|
7
|
-
export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
|
|
8
|
+
export declare function skipSorting(rowTree: GridRowTreeConfig): GridRowId[];
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves the parent path for a row from the previous tree state.
|
|
11
|
+
* Used during full tree updates to maintain correct hierarchy.
|
|
12
|
+
*/
|
|
13
|
+
export declare function getParentPath(rowId: GridRowId, treeCreationParams: GridRowTreeCreationParams): string[];
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
+
exports.getParentPath = getParentPath;
|
|
6
7
|
exports.skipFiltering = skipFiltering;
|
|
7
8
|
exports.skipSorting = skipSorting;
|
|
8
9
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
@@ -22,4 +23,15 @@ function skipFiltering(rowTree) {
|
|
|
22
23
|
}
|
|
23
24
|
function skipSorting(rowTree) {
|
|
24
25
|
return (0, _internals.getTreeNodeDescendants)(rowTree, _xDataGrid.GRID_ROOT_GROUP_ID, false);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Retrieves the parent path for a row from the previous tree state.
|
|
30
|
+
* Used during full tree updates to maintain correct hierarchy.
|
|
31
|
+
*/
|
|
32
|
+
function getParentPath(rowId, treeCreationParams) {
|
|
33
|
+
if (treeCreationParams.updates.type !== 'full' || !treeCreationParams.previousTree?.[rowId] || treeCreationParams.previousTree[rowId].depth < 1 || !('path' in treeCreationParams.previousTree[rowId])) {
|
|
34
|
+
return [];
|
|
35
|
+
}
|
|
36
|
+
return treeCreationParams.previousTree[rowId].path || [];
|
|
25
37
|
}
|
package/index.js
CHANGED
package/internals/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
export * from '@mui/x-data-grid/internals';
|
|
2
2
|
export { GridColumnHeaders } from "../components/GridColumnHeaders.js";
|
|
3
3
|
export { DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS } from "../constants/dataGridProDefaultSlotsComponents.js";
|
|
4
|
+
/**
|
|
5
|
+
* x-data-grid-pro internals that are overriding the x-data-grid internals
|
|
6
|
+
*/
|
|
4
7
|
export { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
|
|
5
8
|
export { useGridAriaAttributes } from "../hooks/utils/useGridAriaAttributes.js";
|
|
6
9
|
export { useGridRowAriaAttributes } from "../hooks/features/rows/useGridRowAriaAttributes.js";
|
|
@@ -31,5 +34,5 @@ export { updateRowTree } from "../utils/tree/updateRowTree.js";
|
|
|
31
34
|
export { sortRowTree } from "../utils/tree/sortRowTree.js";
|
|
32
35
|
export { insertNodeInTree, removeNodeFromTree, getVisibleRowsLookup } from "../utils/tree/utils.js";
|
|
33
36
|
export type { RowTreeBuilderGroupingCriterion } from "../utils/tree/models.js";
|
|
34
|
-
export { skipSorting, skipFiltering } from "../hooks/features/serverSideTreeData/utils.js";
|
|
37
|
+
export { skipSorting, skipFiltering, getParentPath } from "../hooks/features/serverSideTreeData/utils.js";
|
|
35
38
|
export * from "./propValidation.js";
|
package/internals/index.js
CHANGED
|
@@ -43,7 +43,8 @@ var _exportNames = {
|
|
|
43
43
|
removeNodeFromTree: true,
|
|
44
44
|
getVisibleRowsLookup: true,
|
|
45
45
|
skipSorting: true,
|
|
46
|
-
skipFiltering: true
|
|
46
|
+
skipFiltering: true,
|
|
47
|
+
getParentPath: true
|
|
47
48
|
};
|
|
48
49
|
Object.defineProperty(exports, "DATA_GRID_PRO_DEFAULT_SLOTS_COMPONENTS", {
|
|
49
50
|
enumerable: true,
|
|
@@ -99,6 +100,12 @@ Object.defineProperty(exports, "getGroupKeys", {
|
|
|
99
100
|
return _utils.getGroupKeys;
|
|
100
101
|
}
|
|
101
102
|
});
|
|
103
|
+
Object.defineProperty(exports, "getParentPath", {
|
|
104
|
+
enumerable: true,
|
|
105
|
+
get: function () {
|
|
106
|
+
return _utils3.getParentPath;
|
|
107
|
+
}
|
|
108
|
+
});
|
|
102
109
|
Object.defineProperty(exports, "getVisibleRowsLookup", {
|
|
103
110
|
enumerable: true,
|
|
104
111
|
get: function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-pro",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Pro plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -36,13 +36,13 @@
|
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@babel/runtime": "^7.27.6",
|
|
39
|
-
"@mui/utils": "^7.
|
|
39
|
+
"@mui/utils": "^7.2.0",
|
|
40
40
|
"@types/format-util": "^1.0.4",
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
42
|
"prop-types": "^15.8.1",
|
|
43
|
-
"@mui/x-
|
|
44
|
-
"@mui/x-
|
|
45
|
-
"@mui/x-license": "8.
|
|
43
|
+
"@mui/x-internals": "8.8.0",
|
|
44
|
+
"@mui/x-data-grid": "8.8.0",
|
|
45
|
+
"@mui/x-license": "8.8.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"@emotion/react": "^11.9.0",
|