@mui/x-data-grid-premium 8.21.0 → 8.22.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 +238 -1
- package/DataGridPremium/DataGridPremium.js +1 -1
- package/components/chartsPanel/data/GridChartsPanelDataField.js +3 -2
- package/esm/DataGridPremium/DataGridPremium.js +1 -1
- package/esm/components/chartsPanel/data/GridChartsPanelDataField.js +3 -2
- package/esm/hooks/features/aggregation/createAggregationLookup.js +7 -1
- package/esm/hooks/features/cellSelection/useGridCellSelection.js +4 -1
- package/esm/hooks/features/pivoting/utils.js +7 -1
- package/esm/index.js +1 -1
- package/hooks/features/aggregation/createAggregationLookup.js +7 -1
- package/hooks/features/cellSelection/useGridCellSelection.js +3 -0
- package/hooks/features/pivoting/utils.js +7 -1
- package/index.js +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,243 @@
|
|
|
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.22.1
|
|
9
|
+
|
|
10
|
+
_Dec 17, 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
|
+
- 🌎 Improve Swedish (sv-SE) locale on the Data Grid
|
|
15
|
+
- 🐞 Bugfixes
|
|
16
|
+
|
|
17
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
18
|
+
@KyeongJooni, @VismaAndreasIvarsson
|
|
19
|
+
|
|
20
|
+
The following team members contributed to this release:
|
|
21
|
+
@alelthomas, @alexfauquette, @arminmeh, @bernardobelchior, @Janpot, @JCQuintas, @mapache-salvaje, @michelengelen, @mj12albert, @prakhargupta1, @romgrk, @siriwatknp
|
|
22
|
+
|
|
23
|
+
### Data Grid
|
|
24
|
+
|
|
25
|
+
#### `@mui/x-data-grid@8.22.1`
|
|
26
|
+
|
|
27
|
+
- [data grid] Fix column menu keyboard shortcut (#20621) @mj12albert
|
|
28
|
+
- [data grid] Fix row checkbox disabled state on first render and keep cell focusable (ARIA) (#20641) @michelengelen
|
|
29
|
+
- [data grid] Fix tree data selection bug (#20528) @michelengelen
|
|
30
|
+
- [data grid] Prevent clear cell selection on edit mode (#20544) @siriwatknp
|
|
31
|
+
- [data grid] Refactor column merge logic to prioritize defined properties only (#20640) @michelengelen
|
|
32
|
+
- [data grid] Reset row spanning on row expansion change (#20661) @siriwatknp
|
|
33
|
+
- [data grid] Resize newly added rows while resize action is happening (#20676)
|
|
34
|
+
- [l10n] Improve Swedish (sv-SE) locale (#20682) @VismaAndreasIvarsson
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@8.22.1`.
|
|
39
|
+
|
|
40
|
+
#### `@mui/x-data-grid-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
41
|
+
|
|
42
|
+
Same changes as in `@mui/x-data-grid-pro@8.22.1`, plus:
|
|
43
|
+
|
|
44
|
+
- [DataGridPremium] Import `useId()` from `@mui/utils` to maintain React 17 compatibility (#20635) @arminmeh
|
|
45
|
+
|
|
46
|
+
### Date and Time Pickers
|
|
47
|
+
|
|
48
|
+
#### `@mui/x-date-pickers@8.22.1`
|
|
49
|
+
|
|
50
|
+
- [pickers] Add minutesStep validation test (#20672) @KyeongJooni
|
|
51
|
+
- [pickers] Fix `onAccept()` returning wrong year after selecting year then month (#20639) @michelengelen
|
|
52
|
+
|
|
53
|
+
#### `@mui/x-date-pickers-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
54
|
+
|
|
55
|
+
Same changes as in `@mui/x-date-pickers@8.22.1`.
|
|
56
|
+
|
|
57
|
+
### Charts
|
|
58
|
+
|
|
59
|
+
#### `@mui/x-charts@8.22.1`
|
|
60
|
+
|
|
61
|
+
- [charts] Extract `FocusedPieArc` from `PieArcPlot` (#20613) @alexfauquette
|
|
62
|
+
- [charts] Fix regression on the highlight control (#20627) @alexfauquette
|
|
63
|
+
- [charts] Refactor: `useSelector()` => `store.use()` (#20681) @romgrk
|
|
64
|
+
- [charts] Remove duplicated types (#20694) @alexfauquette
|
|
65
|
+
- [charts] Remove unused generics from bar charts (#20642) @bernardobelchior
|
|
66
|
+
- [charts] Simplify tooltip position getter for pie chart (#20625) @alexfauquette
|
|
67
|
+
|
|
68
|
+
#### `@mui/x-charts-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
69
|
+
|
|
70
|
+
Same changes as in `@mui/x-charts@8.22.1`, plus:
|
|
71
|
+
|
|
72
|
+
- [charts-pro] Add heatmap performance benchmark (#20695) @bernardobelchior
|
|
73
|
+
|
|
74
|
+
#### `@mui/x-charts-premium@8.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
75
|
+
|
|
76
|
+
Same changes as in `@mui/x-charts-pro@8.22.1`, plus:
|
|
77
|
+
|
|
78
|
+
- [charts-premium] Create `BarChartPremium` (#20643) @bernardobelchior
|
|
79
|
+
|
|
80
|
+
### Tree View
|
|
81
|
+
|
|
82
|
+
#### `@mui/x-tree-view@8.22.1`
|
|
83
|
+
|
|
84
|
+
Internal changes.
|
|
85
|
+
|
|
86
|
+
#### `@mui/x-tree-view-pro@8.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
87
|
+
|
|
88
|
+
Same changes as in `@mui/x-tree-view@8.22.1`.
|
|
89
|
+
|
|
90
|
+
### Codemod
|
|
91
|
+
|
|
92
|
+
#### `@mui/x-codemod@8.22.1`
|
|
93
|
+
|
|
94
|
+
Internal changes.
|
|
95
|
+
|
|
96
|
+
### Docs
|
|
97
|
+
|
|
98
|
+
- [docs] Add button to GitHub source code for the Data Grid advanced demos (DX-50) (#20633) @alelthomas
|
|
99
|
+
- [docs] Remove `seriesConfig` to prevent future confusion (#20678) @alexfauquette
|
|
100
|
+
- [docs] Revise the Data Grid's API object doc for clarity and style (#20649) @mapache-salvaje
|
|
101
|
+
- [docs] Update list of charts (#20479) @prakhargupta1
|
|
102
|
+
|
|
103
|
+
### Core
|
|
104
|
+
|
|
105
|
+
- [code-infra] Regression tests improvements (#20441) @Janpot
|
|
106
|
+
- [code-infra] Test utils upgrade (#20592) @Janpot
|
|
107
|
+
- [code-infra] Try to fix the Tree View flacky tests (#20573) @JCQuintas
|
|
108
|
+
|
|
109
|
+
## 8.22.0
|
|
110
|
+
|
|
111
|
+
_Dec 11, 2025_
|
|
112
|
+
|
|
113
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
114
|
+
|
|
115
|
+
- Each Tree View component now exposes its own hook to initialize the `apiRef` object with accurate typing:
|
|
116
|
+
|
|
117
|
+
```diff
|
|
118
|
+
-import { useTreeViewApiRef } from '@mui/x-tree-view/hooks';
|
|
119
|
+
+import { useSimpleTreeViewApiRef } from '@mui/x-tree-view/hooks';
|
|
120
|
+
-const apiRef = useTreeViewApiRef();
|
|
121
|
+
+const apiRef = useSimpleTreeViewApiRef();
|
|
122
|
+
|
|
123
|
+
-import { useTreeViewApiRef } from '@mui/x-tree-view/hooks';
|
|
124
|
+
+import { useRichTreeViewApiRef } from '@mui/x-tree-view/hooks';
|
|
125
|
+
-const apiRef = useTreeViewApiRef();
|
|
126
|
+
+const apiRef = useRichTreeViewApiRef();
|
|
127
|
+
|
|
128
|
+
-import { useTreeViewApiRef } from '@mui/x-tree-view/hooks';
|
|
129
|
+
+import { useRichTreeViewProApiRef } from '@mui/x-tree-view-pro/hooks';
|
|
130
|
+
-const apiRef = useTreeViewApiRef();
|
|
131
|
+
+const apiRef = useRichTreeViewProApiRef();
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
- 📚 [Tutorial](https://mui.com/x/react-data-grid/tutorials/server-side-data/) on building a Data Grid with server-side data
|
|
135
|
+
- 🐞 Bugfixes
|
|
136
|
+
|
|
137
|
+
Special thanks go out to this community member for their valuable contributions:
|
|
138
|
+
@kzhgit
|
|
139
|
+
|
|
140
|
+
The following team members contributed to this release:
|
|
141
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @cherniavskii, @flaviendelangle, @JCQuintas, @mapache-salvaje, @michelengelen, @noraleonte, @oliviertassinari
|
|
142
|
+
|
|
143
|
+
### Data Grid
|
|
144
|
+
|
|
145
|
+
#### `@mui/x-data-grid@8.22.0`
|
|
146
|
+
|
|
147
|
+
- [DataGrid] Sync component props with theme defaults (#20590) @michelengelen
|
|
148
|
+
- [DataGrid] Add fallback for CSS `color-mix` if it is unsupported (#20597) @cherniavskii
|
|
149
|
+
- [DataGrid] Use `baseTooltip` slot for column header sort icon (#20460) @kzhgit
|
|
150
|
+
|
|
151
|
+
#### `@mui/x-data-grid-pro@8.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
152
|
+
|
|
153
|
+
Same changes as in `@mui/x-data-grid@8.22.0`.
|
|
154
|
+
|
|
155
|
+
#### `@mui/x-data-grid-premium@8.22.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
156
|
+
|
|
157
|
+
Same changes as in `@mui/x-data-grid-pro@8.22.0`, plus:
|
|
158
|
+
|
|
159
|
+
- [DataGridPremium] Handle pivoting column name generation for empty strings (#20608) @arminmeh
|
|
160
|
+
- [DataGridPremium] Pass a row with aggregated value to the custom aggregation function `valueFormatter` (#20607) @arminmeh
|
|
161
|
+
|
|
162
|
+
### Date and Time Pickers
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-date-pickers@8.22.0`
|
|
165
|
+
|
|
166
|
+
- [pickers] Fix invalid date tests (#20606) @michelengelen
|
|
167
|
+
|
|
168
|
+
#### `@mui/x-date-pickers-pro@8.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
169
|
+
|
|
170
|
+
Same changes as in `@mui/x-date-pickers@8.22.0`.
|
|
171
|
+
|
|
172
|
+
### Charts
|
|
173
|
+
|
|
174
|
+
#### `@mui/x-charts@8.22.0`
|
|
175
|
+
|
|
176
|
+
- [charts] Add consistent animation duration and timing (#20564) @JCQuintas
|
|
177
|
+
- [charts] Extract a tooltip plugin from the interaction one (#20591) @alexfauquette
|
|
178
|
+
- [charts] General type improvements (#20565) @JCQuintas
|
|
179
|
+
- [charts] Place ordinal ticks according to a continuous scale (#19808) @alexfauquette
|
|
180
|
+
- [charts] Remove layout data from the tooltip internals (#20548) @alexfauquette
|
|
181
|
+
- [charts] Remove usage of focus outline for item highlight (#19856) @alexfauquette
|
|
182
|
+
- [charts] Simplify `MarkPlot` by moving calculation to `useMarkPlotData` (#20570) @JCQuintas
|
|
183
|
+
- [charts] Use `store.state` over `store.getSnapshot()` (#20616) @bernardobelchior
|
|
184
|
+
- [charts] Vendor flatqueue (#20610) @bernardobelchior
|
|
185
|
+
- [charts] Extract pie layout computation (#20611) @alexfauquette
|
|
186
|
+
- [charts][infra] Enable `@typescript-eslint/consistent-type-imports` eslint rules (#20560) @JCQuintas
|
|
187
|
+
- [charts][infra] Enable `import/no-cycle` eslint rules (#20554) @JCQuintas
|
|
188
|
+
|
|
189
|
+
#### `@mui/x-charts-pro@8.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
190
|
+
|
|
191
|
+
Same changes as in `@mui/x-charts@8.22.0`, plus:
|
|
192
|
+
|
|
193
|
+
- [charts-pro] Display sankey labels on top of nodes (#20569) @alexfauquette
|
|
194
|
+
|
|
195
|
+
#### `@mui/x-charts-premium@8.22.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
196
|
+
|
|
197
|
+
Same changes as in `@mui/x-charts-pro@8.22.0`.
|
|
198
|
+
|
|
199
|
+
### Tree View
|
|
200
|
+
|
|
201
|
+
#### `@mui/x-tree-view@8.22.0`
|
|
202
|
+
|
|
203
|
+
- [tree view] Expose one hook per component to initialize the `apiRef` (#20235) @flaviendelangle
|
|
204
|
+
- [tree view] Update the typing of `updateItemChildren()` to accept `null` (#20483) @noraleonte
|
|
205
|
+
|
|
206
|
+
#### `@mui/x-tree-view-pro@8.22.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
207
|
+
|
|
208
|
+
Same changes as in `@mui/x-tree-view@8.22.0`.
|
|
209
|
+
|
|
210
|
+
### Codemod
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-codemod@8.22.0`
|
|
213
|
+
|
|
214
|
+
Internal changes.
|
|
215
|
+
|
|
216
|
+
### Docs
|
|
217
|
+
|
|
218
|
+
- [docs] Add tutorial on building a Data Grid with server-side data (DX-22) (#19782) @mapache-salvaje
|
|
219
|
+
- [docs] Modify the default value for the stacking demo (#20596) @alexfauquette
|
|
220
|
+
- [docs] Revise the Charts Custom Components doc (#19793) @mapache-salvaje
|
|
221
|
+
- [docs] Remove copy-pasted `aria-label` (#20620) @alexfauquette
|
|
222
|
+
|
|
223
|
+
### Core
|
|
224
|
+
|
|
225
|
+
- [internal] Remove unsafe dependency version from range (#20574) @oliviertassinari
|
|
226
|
+
|
|
227
|
+
### Miscellaneous
|
|
228
|
+
|
|
229
|
+
- Bump `@mui/monorepo` digest to `800638d` (#20337) @renovate[bot]
|
|
230
|
+
- Bump `@next/eslint-plugin-next` to `15.5.7` (#20575) @renovate[bot]
|
|
231
|
+
- Bump GitHub Actions (#20577) @renovate[bot]
|
|
232
|
+
- Bump Tanstack query to `^5.90.12` (#20582) @renovate[bot]
|
|
233
|
+
- Bump Vite & Vitest (#20583) @renovate[bot]
|
|
234
|
+
- Bump `eslint` to `^8.48.1` (#20576) @renovate[bot]
|
|
235
|
+
- Bump `markdown-to-jsx` to `^9.3.2` (#20507) @renovate[bot]
|
|
236
|
+
- Bump `motion` to `^12.23.25` (#20579) @renovate[bot]
|
|
237
|
+
- Bump react monorepo to `19.2.1` (#20581) @renovate[bot]
|
|
238
|
+
- Bump `react-hook-form` to `^7.68.0` (#20584) @renovate[bot]
|
|
239
|
+
- Bump `react-router` to `^7.10.1` (#20341) @renovate[bot]
|
|
240
|
+
- Bump `tsx` to `^4.21.0` (#20585) @renovate[bot]
|
|
241
|
+
- Bump MUI infra packages (#20478) @renovate[bot]
|
|
242
|
+
- [infra] Automatically add teams to release PRs (#20558) @JCQuintas
|
|
243
|
+
- [infra] Fix codeowners typo (#20562) @JCQuintas
|
|
244
|
+
|
|
8
245
|
## 8.21.0
|
|
9
246
|
|
|
10
247
|
_Dec 3, 2025_
|
|
@@ -115,7 +352,7 @@ Internal changes.
|
|
|
115
352
|
- Bump react-hook-form to ^7.66.1 (#20497) @renovate[bot]
|
|
116
353
|
- Bump rimraf to ^6.1.2 (#20498) @renovate[bot]
|
|
117
354
|
- Bump webpack-bundle-analyzer to ^5.0.1 (#20508) @renovate[bot]
|
|
118
|
-
- Bump next to ^15.5.
|
|
355
|
+
- Bump next to ^15.5.7 [SECURITY] (#20555) @renovate[bot]
|
|
119
356
|
|
|
120
357
|
## 8.20.0
|
|
121
358
|
|
|
@@ -50,7 +50,7 @@ const configuration = {
|
|
|
50
50
|
useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
-
const releaseInfo = "
|
|
53
|
+
const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
|
|
54
54
|
const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
|
|
55
55
|
packageName: "x-data-grid-premium",
|
|
56
56
|
releaseInfo: releaseInfo
|
|
@@ -10,6 +10,7 @@ exports.AggregationSelect = AggregationSelect;
|
|
|
10
10
|
exports.GridChartsPanelDataField = GridChartsPanelDataField;
|
|
11
11
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
12
12
|
var React = _interopRequireWildcard(require("react"));
|
|
13
|
+
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
13
14
|
var _system = require("@mui/system");
|
|
14
15
|
var _xDataGridPro = require("@mui/x-data-grid-pro");
|
|
15
16
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
@@ -133,8 +134,8 @@ function AggregationSelect({
|
|
|
133
134
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
134
135
|
const [aggregationMenuOpen, setAggregationMenuOpen] = React.useState(false);
|
|
135
136
|
const aggregationMenuTriggerRef = React.useRef(null);
|
|
136
|
-
const aggregationMenuTriggerId =
|
|
137
|
-
const aggregationMenuId =
|
|
137
|
+
const aggregationMenuTriggerId = (0, _useId.default)();
|
|
138
|
+
const aggregationMenuId = (0, _useId.default)();
|
|
138
139
|
const apiRef = (0, _useGridApiContext.useGridApiContext)();
|
|
139
140
|
const aggregationModel = (0, _aggregation.gridAggregationModelSelector)(apiRef);
|
|
140
141
|
const pivotActive = (0, _internals.gridPivotActiveSelector)(apiRef);
|
|
@@ -43,7 +43,7 @@ const configuration = {
|
|
|
43
43
|
useGridParamsOverridableMethods
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
|
-
const releaseInfo = "
|
|
46
|
+
const releaseInfo = "MTc2NjAxNjAwMDAwMA==";
|
|
47
47
|
const watermark = /*#__PURE__*/_jsx(Watermark, {
|
|
48
48
|
packageName: "x-data-grid-premium",
|
|
49
49
|
releaseInfo: releaseInfo
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import * as React from 'react';
|
|
5
|
+
import useId from '@mui/utils/useId';
|
|
5
6
|
import { styled } from '@mui/system';
|
|
6
7
|
import { getDataGridUtilityClass, GridMenu, useGridSelector } from '@mui/x-data-grid-pro';
|
|
7
8
|
import composeClasses from '@mui/utils/composeClasses';
|
|
@@ -125,8 +126,8 @@ export function AggregationSelect({
|
|
|
125
126
|
const rootProps = useGridRootProps();
|
|
126
127
|
const [aggregationMenuOpen, setAggregationMenuOpen] = React.useState(false);
|
|
127
128
|
const aggregationMenuTriggerRef = React.useRef(null);
|
|
128
|
-
const aggregationMenuTriggerId =
|
|
129
|
-
const aggregationMenuId =
|
|
129
|
+
const aggregationMenuTriggerId = useId();
|
|
130
|
+
const aggregationMenuId = useId();
|
|
130
131
|
const apiRef = useGridApiContext();
|
|
131
132
|
const aggregationModel = gridAggregationModelSelector(apiRef);
|
|
132
133
|
const pivotActive = gridPivotActiveSelector(apiRef);
|
|
@@ -73,7 +73,13 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
|
|
|
73
73
|
groupId,
|
|
74
74
|
field: aggregatedField // Added per user request in https://github.com/mui/mui-x/issues/6995#issuecomment-1327423455
|
|
75
75
|
}, publicApi);
|
|
76
|
-
|
|
76
|
+
|
|
77
|
+
// Use the actual row from rowLookup if it exists, otherwise pass a new autogenerated row
|
|
78
|
+
const rowForFormatter = rowLookup[groupId] || {
|
|
79
|
+
id: groupId,
|
|
80
|
+
[aggregatedField]: value
|
|
81
|
+
};
|
|
82
|
+
const formattedValue = aggregationFunction.valueFormatter ? aggregationFunction.valueFormatter(value, rowForFormatter, columnsLookup[aggregatedField], apiRef) : undefined;
|
|
77
83
|
|
|
78
84
|
// Only add to groupAggregationLookup if position is not null
|
|
79
85
|
if (position !== null) {
|
|
@@ -5,7 +5,7 @@ import * as React from 'react';
|
|
|
5
5
|
import ownerDocument from '@mui/utils/ownerDocument';
|
|
6
6
|
import useEventCallback from '@mui/utils/useEventCallback';
|
|
7
7
|
import { getTotalHeaderHeight, getVisibleRows, isNavigationKey, serializeCellValue, useGridRegisterPipeProcessor } from '@mui/x-data-grid-pro/internals';
|
|
8
|
-
import { useGridEvent, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, gridSortedRowIdsSelector, gridDimensionsSelector } from '@mui/x-data-grid-pro';
|
|
8
|
+
import { useGridEvent, useGridApiMethod, GRID_ACTIONS_COLUMN_TYPE, GRID_CHECKBOX_SELECTION_COL_DEF, GRID_DETAIL_PANEL_TOGGLE_FIELD, gridClasses, gridFocusCellSelector, GRID_REORDER_COL_DEF, gridSortedRowIdsSelector, gridDimensionsSelector, GridCellModes } from '@mui/x-data-grid-pro';
|
|
9
9
|
import { gridCellSelectionStateSelector } from "./gridCellSelectionSelector.js";
|
|
10
10
|
export const cellSelectionStateInitializer = (state, props) => _extends({}, state, {
|
|
11
11
|
cellSelection: _extends({}, props.cellSelectionModel ?? props.initialState?.cellSelection)
|
|
@@ -313,6 +313,9 @@ export const useGridCellSelection = (apiRef, props) => {
|
|
|
313
313
|
if (!isNavigationKey(event.key) || !cellWithVirtualFocus.current) {
|
|
314
314
|
return;
|
|
315
315
|
}
|
|
316
|
+
if (event.key === ' ' && params.cellMode === GridCellModes.Edit) {
|
|
317
|
+
return;
|
|
318
|
+
}
|
|
316
319
|
if (!event.shiftKey) {
|
|
317
320
|
apiRef.current.setCellSelectionModel({});
|
|
318
321
|
return;
|
|
@@ -167,7 +167,13 @@ export const createPivotPropsFromRows = ({
|
|
|
167
167
|
if (!column) {
|
|
168
168
|
continue;
|
|
169
169
|
}
|
|
170
|
-
|
|
170
|
+
const noValueString = '(No value)';
|
|
171
|
+
let colValue = apiRef.current.getRowValue(row, column) ?? noValueString;
|
|
172
|
+
// Handle empty strings to prevent issues with column grouping model
|
|
173
|
+
// https://github.com/mui/mui-x/issues/20552
|
|
174
|
+
if (colValue === '') {
|
|
175
|
+
colValue = noValueString;
|
|
176
|
+
}
|
|
171
177
|
if (column.type === 'singleSelect') {
|
|
172
178
|
const singleSelectColumn = column;
|
|
173
179
|
if (singleSelectColumn.getOptionLabel) {
|
package/esm/index.js
CHANGED
|
@@ -80,7 +80,13 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
|
|
|
80
80
|
groupId,
|
|
81
81
|
field: aggregatedField // Added per user request in https://github.com/mui/mui-x/issues/6995#issuecomment-1327423455
|
|
82
82
|
}, publicApi);
|
|
83
|
-
|
|
83
|
+
|
|
84
|
+
// Use the actual row from rowLookup if it exists, otherwise pass a new autogenerated row
|
|
85
|
+
const rowForFormatter = rowLookup[groupId] || {
|
|
86
|
+
id: groupId,
|
|
87
|
+
[aggregatedField]: value
|
|
88
|
+
};
|
|
89
|
+
const formattedValue = aggregationFunction.valueFormatter ? aggregationFunction.valueFormatter(value, rowForFormatter, columnsLookup[aggregatedField], apiRef) : undefined;
|
|
84
90
|
|
|
85
91
|
// Only add to groupAggregationLookup if position is not null
|
|
86
92
|
if (position !== null) {
|
|
@@ -321,6 +321,9 @@ const useGridCellSelection = (apiRef, props) => {
|
|
|
321
321
|
if (!(0, _internals.isNavigationKey)(event.key) || !cellWithVirtualFocus.current) {
|
|
322
322
|
return;
|
|
323
323
|
}
|
|
324
|
+
if (event.key === ' ' && params.cellMode === _xDataGridPro.GridCellModes.Edit) {
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
324
327
|
if (!event.shiftKey) {
|
|
325
328
|
apiRef.current.setCellSelectionModel({});
|
|
326
329
|
return;
|
|
@@ -177,7 +177,13 @@ const createPivotPropsFromRows = ({
|
|
|
177
177
|
if (!column) {
|
|
178
178
|
continue;
|
|
179
179
|
}
|
|
180
|
-
|
|
180
|
+
const noValueString = '(No value)';
|
|
181
|
+
let colValue = apiRef.current.getRowValue(row, column) ?? noValueString;
|
|
182
|
+
// Handle empty strings to prevent issues with column grouping model
|
|
183
|
+
// https://github.com/mui/mui-x/issues/20552
|
|
184
|
+
if (colValue === '') {
|
|
185
|
+
colValue = noValueString;
|
|
186
|
+
}
|
|
181
187
|
if (column.type === 'singleSelect') {
|
|
182
188
|
const singleSelectColumn = column;
|
|
183
189
|
if (singleSelectColumn.getOptionLabel) {
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid-premium",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.22.1",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Premium plan edition of the MUI X Data Grid Components.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@mui/x-internal-exceljs-fork": "4.4.3",
|
|
39
39
|
"clsx": "^2.1.1",
|
|
40
40
|
"prop-types": "^15.8.1",
|
|
41
|
-
"@mui/x-data-grid
|
|
42
|
-
"@mui/x-data-grid": "8.
|
|
43
|
-
"@mui/x-internals": "8.
|
|
44
|
-
"@mui/x-license": "8.
|
|
41
|
+
"@mui/x-data-grid": "8.22.1",
|
|
42
|
+
"@mui/x-data-grid-pro": "8.22.1",
|
|
43
|
+
"@mui/x-internals": "8.22.0",
|
|
44
|
+
"@mui/x-license": "8.22.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|