@mui/x-data-grid 8.8.0 → 8.9.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 +131 -24
- package/DataGrid/index.d.ts +0 -1
- package/DataGrid/useDataGridComponent.js +8 -0
- package/components/GridScrollArea.js +1 -1
- package/components/containers/GridRootStyles.js +39 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +3 -1
- package/esm/DataGrid/index.d.ts +0 -1
- package/esm/DataGrid/useDataGridComponent.js +8 -0
- package/esm/components/GridScrollArea.js +1 -1
- package/esm/components/containers/GridRootStyles.js +39 -0
- package/esm/constants/gridClasses.d.ts +12 -0
- package/esm/constants/gridClasses.js +3 -1
- package/esm/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/esm/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/esm/hooks/core/useGridProps.d.ts +2 -2
- package/esm/hooks/core/useGridProps.js +3 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/esm/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/esm/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/esm/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/esm/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/esm/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/esm/hooks/features/columns/useGridColumns.js +8 -10
- package/esm/hooks/features/export/utils.js +1 -1
- package/esm/hooks/features/filter/useGridFilter.js +3 -3
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/esm/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +5 -9
- package/esm/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/esm/hooks/features/listView/gridListViewSelectors.js +7 -0
- package/esm/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/esm/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/esm/hooks/features/rows/gridRowsUtils.js +5 -2
- package/esm/hooks/features/rows/useGridRows.js +4 -3
- package/esm/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/esm/hooks/features/scroll/useGridScroll.js +2 -3
- package/esm/hooks/features/virtualization/useGridVirtualScroller.js +3 -6
- package/esm/hooks/utils/index.d.ts +1 -0
- package/esm/hooks/utils/index.js +2 -1
- package/esm/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/esm/hooks/utils/useGridInitializeState.js +6 -1
- package/esm/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/esm/hooks/utils/useRunOncePerLoop.js +26 -0
- package/esm/index.js +1 -1
- package/esm/models/api/gridRowApi.d.ts +5 -0
- package/esm/models/events/gridEventLookup.d.ts +2 -1
- package/esm/models/gridApiCaches.d.ts +8 -2
- package/esm/models/gridStateCommunity.d.ts +2 -2
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +5 -0
- package/hooks/core/pipeProcessing/useGridPipeProcessing.js +20 -5
- package/hooks/core/useGridProps.d.ts +2 -2
- package/hooks/core/useGridProps.js +3 -1
- package/hooks/features/columnGrouping/gridColumnGroupsInterfaces.d.ts +4 -1
- package/hooks/features/columnGrouping/gridColumnGroupsUtils.js +35 -32
- package/hooks/features/columnGrouping/useGridColumnGrouping.js +18 -13
- package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -3
- package/hooks/features/columns/gridColumnsSelector.js +6 -2
- package/hooks/features/columns/gridColumnsUtils.js +6 -4
- package/hooks/features/columns/useGridColumns.js +8 -10
- package/hooks/features/export/utils.js +1 -1
- package/hooks/features/filter/useGridFilter.js +3 -3
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.d.ts +1 -1
- package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +5 -9
- package/hooks/features/listView/gridListViewSelectors.d.ts +8 -1
- package/hooks/features/listView/gridListViewSelectors.js +8 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +5 -4
- package/hooks/features/rows/gridRowsUtils.d.ts +1 -1
- package/hooks/features/rows/gridRowsUtils.js +5 -2
- package/hooks/features/rows/useGridRows.js +4 -3
- package/hooks/features/scroll/useGridScroll.d.ts +1 -1
- package/hooks/features/scroll/useGridScroll.js +2 -3
- package/hooks/features/virtualization/useGridVirtualScroller.js +3 -6
- package/hooks/utils/index.d.ts +1 -0
- package/hooks/utils/index.js +12 -0
- package/hooks/utils/useGridInitializeState.d.ts +1 -1
- package/hooks/utils/useGridInitializeState.js +6 -1
- package/hooks/utils/useRunOncePerLoop.d.ts +1 -0
- package/hooks/utils/useRunOncePerLoop.js +33 -0
- package/index.js +1 -1
- package/models/api/gridRowApi.d.ts +5 -0
- package/models/events/gridEventLookup.d.ts +2 -1
- package/models/gridApiCaches.d.ts +8 -2
- package/models/gridStateCommunity.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,131 @@
|
|
|
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.9.1
|
|
9
|
+
|
|
10
|
+
_Jul 21, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 2 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
🐞 Fix package publish issue
|
|
15
|
+
|
|
16
|
+
The following are all team members who have contributed to this release:
|
|
17
|
+
@KenanYusuf, @MBilalShafi
|
|
18
|
+
|
|
19
|
+
### Data Grid
|
|
20
|
+
|
|
21
|
+
#### `@mui/x-data-grid@8.9.1`
|
|
22
|
+
|
|
23
|
+
- [DataGrid] Move conditional list view column logic into `gridVisibleColumnDefinitionsSelector` (#18724) @KenanYusuf
|
|
24
|
+
- [DataGrid] Fix row selection "exclude" model inconsistency (#18844) @MBilalShafi
|
|
25
|
+
|
|
26
|
+
#### `@mui/x-data-grid-pro@8.9.1` [](https://mui.com/r/x-pro-svg-link "Pro plan")
|
|
27
|
+
|
|
28
|
+
Same changes as in `@mui/x-data-grid@8.9.1`.
|
|
29
|
+
|
|
30
|
+
#### `@mui/x-data-grid-premium@8.9.1` [](https://mui.com/r/x-premium-svg-link "Premium plan")
|
|
31
|
+
|
|
32
|
+
Same changes as in `@mui/x-data-grid-pro@8.9.1`.
|
|
33
|
+
|
|
34
|
+
### Core
|
|
35
|
+
|
|
36
|
+
- [core] Follow yml syntax convention @oliviertassinari
|
|
37
|
+
|
|
38
|
+
## 8.9.0
|
|
39
|
+
|
|
40
|
+
_Jul 17, 2025_
|
|
41
|
+
|
|
42
|
+
We'd like to extend a big thank you to the 10 contributors who made this release possible. Here are some highlights ✨:
|
|
43
|
+
|
|
44
|
+
- ✨ Improve the drag and drop interaction for Data Grid [row reordering](https://mui.com/x/react-data-grid/row-ordering/) feature. It uses a drop indicator to point to the position the row would be moving to.
|
|
45
|
+
|
|
46
|
+
https://github.com/user-attachments/assets/37284c4f-e8d4-4fc6-a6af-a780592905ef
|
|
47
|
+
|
|
48
|
+
- 🚀 Improve Data Grid Pivoting and Aggregation performance
|
|
49
|
+
|
|
50
|
+
- 📊 Add `minBarSize` to set a minimum height for bars
|
|
51
|
+
|
|
52
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
53
|
+
@lauri865
|
|
54
|
+
|
|
55
|
+
The following are all team members who have contributed to this release:
|
|
56
|
+
@alexfauquette, @arminmeh, @bernardobelchior, @flaviendelangle, @JCQuintas, @LukasTy, @mapache-salvaje, @noraleonte, @MBilalShafi
|
|
57
|
+
|
|
58
|
+
### Data Grid
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-data-grid@8.9.0`
|
|
61
|
+
|
|
62
|
+
Internal changes.
|
|
63
|
+
|
|
64
|
+
#### `@mui/x-data-grid-pro@8.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
65
|
+
|
|
66
|
+
Same changes as in `@mui/x-data-grid@8.9.0`, plus:
|
|
67
|
+
|
|
68
|
+
- [DataGridPro] Row reorder using drop indicator (#18627) @MBilalShafi
|
|
69
|
+
|
|
70
|
+
#### `@mui/x-data-grid-premium@8.9.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
71
|
+
|
|
72
|
+
Same changes as in `@mui/x-data-grid-pro@8.9.0`, plus:
|
|
73
|
+
|
|
74
|
+
- [DataGridPremium] Allow group column overrides with pivoting (#18765) @arminmeh
|
|
75
|
+
- [DataGridPremium] Support sort-dependent aggregation and improve performance (#18348) @lauri865
|
|
76
|
+
|
|
77
|
+
### Date and Time Pickers
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-date-pickers@8.9.0`
|
|
80
|
+
|
|
81
|
+
- [pickers] Avoid useless date creation in `AdapterDayjs` (#18429) @flaviendelangle
|
|
82
|
+
- [pickers] Fix `timeSteps` JSDoc (#18807) @LukasTy
|
|
83
|
+
|
|
84
|
+
#### `@mui/x-date-pickers-pro@8.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
85
|
+
|
|
86
|
+
Same changes as in `@mui/x-date-pickers@8.9.0`.
|
|
87
|
+
|
|
88
|
+
### Charts
|
|
89
|
+
|
|
90
|
+
#### `@mui/x-charts@8.9.0`
|
|
91
|
+
|
|
92
|
+
- [charts] Add `minBarSize` to prevent bars from having 0 height (#18798) @JCQuintas
|
|
93
|
+
- [charts] Add click listener to radar charts (#18773) @alexfauquette
|
|
94
|
+
- [charts] Improve scatter chart pointer move performance (#18775) @bernardobelchior
|
|
95
|
+
- [charts] Simplify radar internal hooks (#18760) @alexfauquette
|
|
96
|
+
- [charts] `minBarSize` now ignores `0` and `null` values (#18816) @JCQuintas
|
|
97
|
+
- [charts] Fix y-axis tick label overlap when using log scale (#18744) @bernardobelchior
|
|
98
|
+
- [charts] Expose <ChartType>Series type for all chart types (#18805) @bernardobelchior
|
|
99
|
+
|
|
100
|
+
#### `@mui/x-charts-pro@8.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
101
|
+
|
|
102
|
+
Same changes as in `@mui/x-charts@8.9.0` plus:
|
|
103
|
+
|
|
104
|
+
[charts-pro] Fix issue where charts gestures weren't properly working when inside the shadow-dom (#18837) @JCQuintas
|
|
105
|
+
|
|
106
|
+
### Tree View
|
|
107
|
+
|
|
108
|
+
#### `@mui/x-tree-view@8.9.0`
|
|
109
|
+
|
|
110
|
+
Internal changes.
|
|
111
|
+
|
|
112
|
+
#### `@mui/x-tree-view-pro@8.9.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
113
|
+
|
|
114
|
+
Same changes as in `@mui/x-tree-view@8.9.0`.
|
|
115
|
+
|
|
116
|
+
### Codemod
|
|
117
|
+
|
|
118
|
+
#### `@mui/x-codemod@8.9.0`
|
|
119
|
+
|
|
120
|
+
Internal changes.
|
|
121
|
+
|
|
122
|
+
### Docs
|
|
123
|
+
|
|
124
|
+
- [data grid][docs] Revise the Pro filter docs (#17929) @mapache-salvaje
|
|
125
|
+
- [charts][docs] Move mark outside clip-path (#18806) @alexfauquette
|
|
126
|
+
|
|
127
|
+
### Miscellaneous
|
|
128
|
+
|
|
129
|
+
- [code-infra] Fix ESLint `import` restriction rule for test files (#18669) @LukasTy
|
|
130
|
+
- [code-infra] Remove charts benchmarks dependency on `@testing-library/jest-dom` (#18800) @bernardobelchior
|
|
131
|
+
- [code-infra] Remove duplicate dependency from `eslint-plugin-mui-x` (#18797) @bernardobelchior
|
|
132
|
+
|
|
8
133
|
## 8.8.0
|
|
9
134
|
|
|
10
135
|
_Jul 11, 2025_
|
|
@@ -216,6 +341,7 @@ We'd like to extend a big thank you to the 12 contributors who made this release
|
|
|
216
341
|
- 📅 Add `usePickerAdapter` hook to access the date adapter.
|
|
217
342
|
|
|
218
343
|
You can use the adapter in your custom components if you need them to work with multiple date libraries — [Learn more](https://mui.com/x/react-date-pickers/custom-components/#access-date-adapter).
|
|
344
|
+
|
|
219
345
|
- 🌎 Improve Danish (da-DK) locale
|
|
220
346
|
- 🌎 Improve German (de-DE) locale
|
|
221
347
|
|
|
@@ -234,13 +360,13 @@ The following are all team members who have contributed to this release:
|
|
|
234
360
|
- [l10n] Improve Danish (da-DK) locale (#18428) @ShahrazH
|
|
235
361
|
- [l10n] Improve German (de-DE) locale (#18388) @omalyutin
|
|
236
362
|
|
|
237
|
-
#### `@mui/x-data-grid-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link
|
|
363
|
+
#### `@mui/x-data-grid-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
238
364
|
|
|
239
365
|
Same changes as in `@mui/x-data-grid@8.6.0`, plus:
|
|
240
366
|
|
|
241
367
|
- [DataGridPro] Fix lazy loading params calculated from rendering context (#18460) @arminmeh
|
|
242
368
|
|
|
243
|
-
#### `@mui/x-data-grid-premium@8.6.0` [](https://mui.com/r/x-premium-svg-link
|
|
369
|
+
#### `@mui/x-data-grid-premium@8.6.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
244
370
|
|
|
245
371
|
Same changes as in `@mui/x-data-grid-pro@8.6.0`.
|
|
246
372
|
|
|
@@ -252,7 +378,7 @@ Same changes as in `@mui/x-data-grid-pro@8.6.0`.
|
|
|
252
378
|
- [pickers] Fix to use latest `value` when updating `lastCommittedValue` in internal state (#18518) @LukasTy
|
|
253
379
|
- [pickers] Use `usePickerAdapter` hook internally instead of `useUtils` (#18465) @LukasTy
|
|
254
380
|
|
|
255
|
-
#### `@mui/x-date-pickers-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link
|
|
381
|
+
#### `@mui/x-date-pickers-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
256
382
|
|
|
257
383
|
Same changes as in `@mui/x-date-pickers@8.6.0`.
|
|
258
384
|
|
|
@@ -269,7 +395,7 @@ Same changes as in `@mui/x-date-pickers@8.6.0`.
|
|
|
269
395
|
- [charts] Improve touch behavior for polar axis (#18531) @JCQuintas
|
|
270
396
|
- [charts] Add `isElementInside` helper (#18530) @JCQuintas
|
|
271
397
|
|
|
272
|
-
#### `@mui/x-charts-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link
|
|
398
|
+
#### `@mui/x-charts-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
273
399
|
|
|
274
400
|
Same changes as in `@mui/x-charts@8.6.0`, plus:
|
|
275
401
|
|
|
@@ -283,7 +409,7 @@ Same changes as in `@mui/x-charts@8.6.0`, plus:
|
|
|
283
409
|
|
|
284
410
|
Internal changes.
|
|
285
411
|
|
|
286
|
-
#### `@mui/x-tree-view-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link
|
|
412
|
+
#### `@mui/x-tree-view-pro@8.6.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
287
413
|
|
|
288
414
|
Same changes as in `@mui/x-tree-view@8.6.0`, plus:
|
|
289
415
|
|
|
@@ -1498,7 +1624,6 @@ Same changes as in `@mui/x-date-pickers@8.0.0-beta.3`.
|
|
|
1498
1624
|
|
|
1499
1625
|
- Removed `react-spring` as a dependency of `@mui/x-charts`.
|
|
1500
1626
|
A consequence of this change is that the props of some slots have been changed because the `SpringValue` wrapper has been removed. The affected slots and props are:
|
|
1501
|
-
|
|
1502
1627
|
- the type of the `x`, `y`, `width` and `height` props of the `bar` slot are now `number`;
|
|
1503
1628
|
- the type of `startAngle`, `endAngle`, `innerRadius`, `outerRadius`, `arcLabelRadius`, `cornerRadius` and `paddingAngle` props of `pieArc` and `pieArcLabel` slot are now `number`.
|
|
1504
1629
|
|
|
@@ -2066,7 +2191,6 @@ Following are all team members who have contributed to this release:
|
|
|
2066
2191
|
- The `slots.baseFormControl` component was removed.
|
|
2067
2192
|
|
|
2068
2193
|
- The "Reset" button in the column visibility panel now resets to the initial column visibility model. Previously it was reset to the model that was active at the time the panel was opened. The reset behavior follows these rules:
|
|
2069
|
-
|
|
2070
2194
|
1. If an initial `columnVisibilityModel` is provided, it resets to that model.
|
|
2071
2195
|
2. If a controlled `columnVisibilityModel` is provided, it resets to the first model value.
|
|
2072
2196
|
3. When the columns are updated (via the `columns` prop or `updateColumns()` API method), the reset reference point updates to the current `columnVisibilityModel`.
|
|
@@ -2089,7 +2213,6 @@ Following are all team members who have contributed to this release:
|
|
|
2089
2213
|
The `exclude` selection type allows to select all rows except the ones in the `ids` set.
|
|
2090
2214
|
|
|
2091
2215
|
This change impacts the following props:
|
|
2092
|
-
|
|
2093
2216
|
- `rowSelectionModel`
|
|
2094
2217
|
- `onRowSelectionModelChange`
|
|
2095
2218
|
- `initialState.rowSelectionModel`
|
|
@@ -2413,7 +2536,6 @@ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.12`, plus:
|
|
|
2413
2536
|
- The `aria-label` on the `<Clock />` component and Time Picker opening button has been fixed to rely on the set `ampm` property instead of defaulting to the user's locale.
|
|
2414
2537
|
|
|
2415
2538
|
- The following unused formats have been removed from the adapters and can no longer be overridden via the `dateFormats` prop on the `<LocalizationProvider />` component:
|
|
2416
|
-
|
|
2417
2539
|
- `fullTime` - please use `fullTime12h` and `fullTime24h` instead:
|
|
2418
2540
|
```diff
|
|
2419
2541
|
<LocalizationProvider
|
|
@@ -2628,7 +2750,6 @@ Following are all team members who have contributed to this release:
|
|
|
2628
2750
|
|
|
2629
2751
|
- `viewportInnerSize.width` now includes pinned columns' widths (fixes recursive loops in updating dimensions <-> columns)
|
|
2630
2752
|
- The Data Grid now has a default background color, and its customization has moved from `theme.mixins.MuiDataGrid` to `theme.palette.DataGrid` with the following properties:
|
|
2631
|
-
|
|
2632
2753
|
- `bg`: Sets the background color of the entire grid (new property)
|
|
2633
2754
|
- `headerBg`: Sets the background color of the header (previously named `containerBackground`)
|
|
2634
2755
|
- `pinnedBg`: Sets the background color of pinned rows and columns (previously named `pinnedBackground`)
|
|
@@ -2657,7 +2778,6 @@ Following are all team members who have contributed to this release:
|
|
|
2657
2778
|
Only the initial value and the type are updated. Logic that initializes the API and its availability remained the same, which means that if you could access API in a particular line of your code before, you are able to access it as well after this change.
|
|
2658
2779
|
|
|
2659
2780
|
Depending on the context in which the API is being used, you can decide what is the best way to deal with `null` value. Some options are:
|
|
2660
|
-
|
|
2661
2781
|
- Use optional chaining
|
|
2662
2782
|
- Use non-null assertion operator if you are sure your code is always executed when the `apiRef` is not `null`
|
|
2663
2783
|
- Return early if `apiRef` is `null`
|
|
@@ -3181,7 +3301,6 @@ Following are all team members who have contributed to this release:
|
|
|
3181
3301
|
#### Breaking changes
|
|
3182
3302
|
|
|
3183
3303
|
- Passing additional props (like `data-*`, `aria-*`) directly on the Data Grid component is no longer supported. To pass the props, use `slotProps`:
|
|
3184
|
-
|
|
3185
3304
|
- For `.root` element, use `slotProps.root`.
|
|
3186
3305
|
- For `.main` element (the one with `role="grid"`), use `slotProps.main`.
|
|
3187
3306
|
|
|
@@ -3698,14 +3817,12 @@ Same changes as in `@mui/x-date-pickers@v8.0.0-alpha.1`, plus:
|
|
|
3698
3817
|
#### Breaking change
|
|
3699
3818
|
|
|
3700
3819
|
- The DX of the Tooltip customization has been refactored
|
|
3701
|
-
|
|
3702
3820
|
- The `tooltip` prop has been removed in favor of `slotProps.tooltip` for consistency.
|
|
3703
3821
|
- The `popper`, `axisContent`, and `itemContent` slots have been removed in favor of the `tooltip` slot which overrides the entire tooltip.
|
|
3704
3822
|
- To override the tooltip content, use the `useItemTooltip` or `useAxisTooltip` hook to get the data, and wrap your component in `ChartsTooltipContainer` to follow the pointer position.
|
|
3705
3823
|
- To override the tooltip placement, use the `ChartsItemTooltipContent` or `ChartsItemTooltipContent` to get default data and place them in your custom tooltip.
|
|
3706
3824
|
|
|
3707
3825
|
- The library now uses the SVG `filter` attribute instead of `d3-color` for color manipulation.
|
|
3708
|
-
|
|
3709
3826
|
- This modification impacts the `LinePlot`, `AreaPlot`, and `BarPlot` components.
|
|
3710
3827
|
If you've customized the `fill` of those elements, you might need to override it by using the CSS `filter`.
|
|
3711
3828
|
- The `theme.styleOverride` is removed for `MuiLineElement`, `MuiAreaElement`, and `MuiBarElement` to improve performance.
|
|
@@ -3815,14 +3932,12 @@ Same changes as in `@mui/x-data-grid-pro@8.0.0-alpha.0`, plus:
|
|
|
3815
3932
|
#### Breaking changes
|
|
3816
3933
|
|
|
3817
3934
|
- The default DOM structure of the field has changed [Learn more](https://mui.com/x/migration/migration-pickers-v7/#new-dom-structure-for-the-field).
|
|
3818
|
-
|
|
3819
3935
|
- Before version `v8.x`, the fields' DOM structure consisted of an `<input />`, which held the whole value for the component, but unfortunately presents a few limitations in terms of accessibility when managing multiple section values.
|
|
3820
3936
|
- Starting with version `v8.x`, all the field and picker components come with a new DOM structure that allows the field component to set aria attributes on individual sections, providing a far better experience with screen readers.
|
|
3821
3937
|
|
|
3822
3938
|
- Some translation keys no longer require `utils` and the date object as parameters, but only the formatted value as a string. The keys affected by this changes are: `clockLabelText`, `openDatePickerDialogue` and `openTimePickerDialogue` — [Learn more](https://mui.com/x/migration/migration-pickers-v7/#stop-passing-utils-and-the-date-object-to-some-translation-keys).
|
|
3823
3939
|
|
|
3824
3940
|
- The following types are no longer exported by `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` — [Learn more](https://mui.com/x/migration/migration-pickers-v7/#removed-types).
|
|
3825
|
-
|
|
3826
3941
|
- `UseDateFieldComponentProps`
|
|
3827
3942
|
- `UseTimeFieldComponentProps`
|
|
3828
3943
|
- `UseDateTimeFieldComponentProps`
|
|
@@ -3870,7 +3985,6 @@ Same changes as in `@mui/x-date-pickers@8.0.0-alpha.0`.
|
|
|
3870
3985
|
- The `slots.legend` does not receive the `drawingArea` prop. You can still access your custom legend with the `useDrawingArea()` hook if your custom legend needs it.
|
|
3871
3986
|
|
|
3872
3987
|
- Removed or renamed multiple props from Series — [Learn more](https://mui.com/x/migration/migration-charts-v7/#series-properties-renaming).
|
|
3873
|
-
|
|
3874
3988
|
- The `highlighted` and `faded` properties of highlightScope have been deprecated in favor of `highlight` and `fade`.
|
|
3875
3989
|
The deprecated ones are now removed.
|
|
3876
3990
|
- The `xAxisKey`, `yAxisKey`, and `zAxisKey` properties have been deprecated in favor of `xAxisId`, `yAxisId`, and `zAxisId`.
|
|
@@ -6134,7 +6248,6 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
6134
6248
|
<img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
6135
6249
|
|
|
6136
6250
|
- 📦 Support CommonJS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
6137
|
-
|
|
6138
6251
|
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
6139
6252
|
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
6140
6253
|
|
|
@@ -7669,7 +7782,6 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
7669
7782
|
#### Breaking changes
|
|
7670
7783
|
|
|
7671
7784
|
- The `density` is a [controlled prop](https://mui.com/x/react-data-grid/accessibility/#set-the-density-programmatically) now, if you were previously passing the `density` prop to the Data Grid, you will need to do one of the following:
|
|
7672
|
-
|
|
7673
7785
|
1. Move it to the `initialState.density` to initialize it.
|
|
7674
7786
|
|
|
7675
7787
|
```diff
|
|
@@ -8175,7 +8287,6 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-beta.4`.
|
|
|
8175
8287
|
```
|
|
8176
8288
|
|
|
8177
8289
|
- The following internal types were exported by mistake and have been removed from the public API:
|
|
8178
|
-
|
|
8179
8290
|
- `UseDateFieldDefaultizedProps`
|
|
8180
8291
|
- `UseTimeFieldDefaultizedProps`
|
|
8181
8292
|
- `UseDateTimeFieldDefaultizedProps`
|
|
@@ -8416,7 +8527,6 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
8416
8527
|
- 🎁 The Line Chart component now has animation by default (#11620) @alexfauquette
|
|
8417
8528
|
- 🚀 All charts have click handlers (#11411) @alexfauquette
|
|
8418
8529
|
Test their respective documentation demonstrations to know more about the data format:
|
|
8419
|
-
|
|
8420
8530
|
- [Scatter Chart](https://v7.mui.com/x/react-charts/scatter/#click-event)
|
|
8421
8531
|
- [Line Chart](https://v7.mui.com/x/react-charts/lines/#click-event)
|
|
8422
8532
|
- [Bar Chart](https://v7.mui.com/x/react-charts/bars/#click-event)
|
|
@@ -8696,7 +8806,6 @@ We'd like to offer a big thanks to the 11 contributors who made this release pos
|
|
|
8696
8806
|
```
|
|
8697
8807
|
|
|
8698
8808
|
The most notable changes that might affect your application or tests are:
|
|
8699
|
-
|
|
8700
8809
|
- The `role="grid"` attribute along with related ARIA attributes are now applied to the inner `div` element instead of the root `div` element:
|
|
8701
8810
|
|
|
8702
8811
|
```diff
|
|
@@ -9247,7 +9356,6 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
|
|
|
9247
9356
|
|
|
9248
9357
|
- The filter panel no longer uses the native version of the [`Select`](https://mui.com/material-ui/react-select/) component for all components.
|
|
9249
9358
|
- The `getOptionValue` and `getOptionLabel` props were removed from the following components:
|
|
9250
|
-
|
|
9251
9359
|
- `GridEditSingleSelectCell`
|
|
9252
9360
|
- `GridFilterInputSingleSelect`
|
|
9253
9361
|
- `GridFilterInputMultipleSingleSelect`
|
|
@@ -9661,7 +9769,6 @@ Same changes as in `@mui/x-data-grid-pro@7.0.0-alpha.3`, plus:
|
|
|
9661
9769
|
- Add new parameters to the `shortcuts` slot `onChange` callback
|
|
9662
9770
|
|
|
9663
9771
|
The `onChange` callback fired when selecting a shortcut now requires two new parameters (previously they were optional):
|
|
9664
|
-
|
|
9665
9772
|
- The [`changeImportance`](/x/react-date-pickers/shortcuts/#behavior-when-selecting-a-shortcut) of the shortcut.
|
|
9666
9773
|
- The `item` containing the entire shortcut object.
|
|
9667
9774
|
|
package/DataGrid/index.d.ts
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
'use client';
|
|
2
3
|
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports.useDataGridComponent = void 0;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
7
10
|
var _useGridInitialization = require("../hooks/core/useGridInitialization");
|
|
8
11
|
var _useGridInitializeState = require("../hooks/utils/useGridInitializeState");
|
|
9
12
|
var _useGridClipboard = require("../hooks/features/clipboard/useGridClipboard");
|
|
@@ -96,5 +99,10 @@ const useDataGridComponent = (apiRef, props) => {
|
|
|
96
99
|
(0, _virtualization.useGridVirtualization)(apiRef, props);
|
|
97
100
|
(0, _useGridListView.useGridListView)(apiRef, props);
|
|
98
101
|
(0, _useGridDataSource.useGridDataSource)(apiRef, props);
|
|
102
|
+
|
|
103
|
+
// Should be the last thing to run, because all pre-processors should have been registered by now.
|
|
104
|
+
React.useEffect(() => {
|
|
105
|
+
apiRef.current.runAppliersForPendingProcessors();
|
|
106
|
+
});
|
|
99
107
|
};
|
|
100
108
|
exports.useDataGridComponent = useDataGridComponent;
|
|
@@ -190,7 +190,7 @@ function GridVerticalScrollAreaContent(props) {
|
|
|
190
190
|
if (scrollDirection === 'down') {
|
|
191
191
|
// Only render if the user has not reached yet the bottom of the list
|
|
192
192
|
const totalRowsHeight = rowsMeta.currentPageTotalHeight || 0;
|
|
193
|
-
const maxScrollTop = totalRowsHeight - dimensions.viewportInnerSize.height - dimensions.scrollbarSize;
|
|
193
|
+
const maxScrollTop = totalRowsHeight - dimensions.viewportInnerSize.height - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);
|
|
194
194
|
return scrollPosition.current.top < maxScrollTop;
|
|
195
195
|
}
|
|
196
196
|
return false;
|
|
@@ -247,6 +247,12 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
247
247
|
[`& .${_gridClasses.gridClasses.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
|
|
248
248
|
}, {
|
|
249
249
|
[`& .${_gridClasses.gridClasses.withBorderColor}`]: styles.withBorderColor
|
|
250
|
+
}, {
|
|
251
|
+
[`& .${_gridClasses.gridClasses['row--dropAbove']}`]: styles['row--dropAbove']
|
|
252
|
+
}, {
|
|
253
|
+
[`& .${_gridClasses.gridClasses['row--dropBelow']}`]: styles['row--dropBelow']
|
|
254
|
+
}, {
|
|
255
|
+
[`& .${_gridClasses.gridClasses['row--beingDragged']}`]: styles['row--beingDragged']
|
|
250
256
|
}]
|
|
251
257
|
})(() => {
|
|
252
258
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
@@ -868,6 +874,39 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
868
874
|
[`& .${_gridClasses.gridClasses['scrollbar--vertical']}, & .${_gridClasses.gridClasses.pinnedRows}, & .${_gridClasses.gridClasses.virtualScroller} > .${_gridClasses.gridClasses.filler}`]: {
|
|
869
875
|
display: 'none'
|
|
870
876
|
}
|
|
877
|
+
},
|
|
878
|
+
[`& .${_gridClasses.gridClasses['row--dropAbove']}`]: {
|
|
879
|
+
position: 'relative',
|
|
880
|
+
'&::before': {
|
|
881
|
+
content: '""',
|
|
882
|
+
position: 'absolute',
|
|
883
|
+
top: 0,
|
|
884
|
+
left: 0,
|
|
885
|
+
width: '100%',
|
|
886
|
+
height: '2px',
|
|
887
|
+
backgroundColor: _cssVariables.vars.colors.interactive.selected
|
|
888
|
+
}
|
|
889
|
+
},
|
|
890
|
+
[`& .${_gridClasses.gridClasses['row--dropBelow']}`]: {
|
|
891
|
+
position: 'relative',
|
|
892
|
+
'&::before': {
|
|
893
|
+
content: '""',
|
|
894
|
+
position: 'absolute',
|
|
895
|
+
bottom: '-2px',
|
|
896
|
+
left: 0,
|
|
897
|
+
width: '100%',
|
|
898
|
+
height: '2px',
|
|
899
|
+
backgroundColor: _cssVariables.vars.colors.interactive.selected
|
|
900
|
+
},
|
|
901
|
+
[`&.${_gridClasses.gridClasses['row--lastVisible']}`]: {
|
|
902
|
+
'&::before': {
|
|
903
|
+
bottom: 'calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)'
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
[`& .${_gridClasses.gridClasses['row--beingDragged']}`]: {
|
|
908
|
+
backgroundColor: _cssVariables.vars.colors.background.overlay,
|
|
909
|
+
color: _cssVariables.vars.colors.foreground.disabled
|
|
871
910
|
}
|
|
872
911
|
};
|
|
873
912
|
return gridStyle;
|
|
@@ -577,6 +577,18 @@ export interface GridClasses {
|
|
|
577
577
|
* Styles applied to the floating special row reorder cell element when it is dragged.
|
|
578
578
|
*/
|
|
579
579
|
'row--dragging': string;
|
|
580
|
+
/**
|
|
581
|
+
* Styles applied to the row element when it is a drop target above.
|
|
582
|
+
*/
|
|
583
|
+
'row--dropAbove': string;
|
|
584
|
+
/**
|
|
585
|
+
* Styles applied to the row element when it is a drop target below.
|
|
586
|
+
*/
|
|
587
|
+
'row--dropBelow': string;
|
|
588
|
+
/**
|
|
589
|
+
* Styles applied to the row element when it is being dragged (entire row).
|
|
590
|
+
*/
|
|
591
|
+
'row--beingDragged': string;
|
|
580
592
|
/**
|
|
581
593
|
* Styles applied to the first visible row element on every page of the grid.
|
|
582
594
|
*/
|
package/constants/gridClasses.js
CHANGED
|
@@ -11,4 +11,6 @@ var _generateUtilityClasses = _interopRequireDefault(require("@mui/utils/generat
|
|
|
11
11
|
function getDataGridUtilityClass(slot) {
|
|
12
12
|
return (0, _generateUtilityClass.default)('MuiDataGrid', slot);
|
|
13
13
|
}
|
|
14
|
-
const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
14
|
+
const gridClasses = exports.gridClasses = (0, _generateUtilityClasses.default)('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
15
|
+
// TODO v9: Rename to `cell--dragging`
|
|
16
|
+
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
package/esm/DataGrid/index.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
1
4
|
import { useGridInitialization } from "../hooks/core/useGridInitialization.js";
|
|
2
5
|
import { useGridInitializeState } from "../hooks/utils/useGridInitializeState.js";
|
|
3
6
|
import { useGridClipboard } from "../hooks/features/clipboard/useGridClipboard.js";
|
|
@@ -90,4 +93,9 @@ export const useDataGridComponent = (apiRef, props) => {
|
|
|
90
93
|
useGridVirtualization(apiRef, props);
|
|
91
94
|
useGridListView(apiRef, props);
|
|
92
95
|
useGridDataSource(apiRef, props);
|
|
96
|
+
|
|
97
|
+
// Should be the last thing to run, because all pre-processors should have been registered by now.
|
|
98
|
+
React.useEffect(() => {
|
|
99
|
+
apiRef.current.runAppliersForPendingProcessors();
|
|
100
|
+
});
|
|
93
101
|
};
|
|
@@ -183,7 +183,7 @@ function GridVerticalScrollAreaContent(props) {
|
|
|
183
183
|
if (scrollDirection === 'down') {
|
|
184
184
|
// Only render if the user has not reached yet the bottom of the list
|
|
185
185
|
const totalRowsHeight = rowsMeta.currentPageTotalHeight || 0;
|
|
186
|
-
const maxScrollTop = totalRowsHeight - dimensions.viewportInnerSize.height - dimensions.scrollbarSize;
|
|
186
|
+
const maxScrollTop = totalRowsHeight - dimensions.viewportInnerSize.height - (dimensions.hasScrollX ? dimensions.scrollbarSize : 0);
|
|
187
187
|
return scrollPosition.current.top < maxScrollTop;
|
|
188
188
|
}
|
|
189
189
|
return false;
|
|
@@ -241,6 +241,12 @@ export const GridRootStyles = styled('div', {
|
|
|
241
241
|
[`& .${c.treeDataGroupingCellToggle}`]: styles.treeDataGroupingCellToggle
|
|
242
242
|
}, {
|
|
243
243
|
[`& .${c.withBorderColor}`]: styles.withBorderColor
|
|
244
|
+
}, {
|
|
245
|
+
[`& .${c['row--dropAbove']}`]: styles['row--dropAbove']
|
|
246
|
+
}, {
|
|
247
|
+
[`& .${c['row--dropBelow']}`]: styles['row--dropBelow']
|
|
248
|
+
}, {
|
|
249
|
+
[`& .${c['row--beingDragged']}`]: styles['row--beingDragged']
|
|
244
250
|
}]
|
|
245
251
|
})(() => {
|
|
246
252
|
const apiRef = useGridPrivateApiContext();
|
|
@@ -862,6 +868,39 @@ export const GridRootStyles = styled('div', {
|
|
|
862
868
|
[`& .${c['scrollbar--vertical']}, & .${c.pinnedRows}, & .${c.virtualScroller} > .${c.filler}`]: {
|
|
863
869
|
display: 'none'
|
|
864
870
|
}
|
|
871
|
+
},
|
|
872
|
+
[`& .${c['row--dropAbove']}`]: {
|
|
873
|
+
position: 'relative',
|
|
874
|
+
'&::before': {
|
|
875
|
+
content: '""',
|
|
876
|
+
position: 'absolute',
|
|
877
|
+
top: 0,
|
|
878
|
+
left: 0,
|
|
879
|
+
width: '100%',
|
|
880
|
+
height: '2px',
|
|
881
|
+
backgroundColor: vars.colors.interactive.selected
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
[`& .${c['row--dropBelow']}`]: {
|
|
885
|
+
position: 'relative',
|
|
886
|
+
'&::before': {
|
|
887
|
+
content: '""',
|
|
888
|
+
position: 'absolute',
|
|
889
|
+
bottom: '-2px',
|
|
890
|
+
left: 0,
|
|
891
|
+
width: '100%',
|
|
892
|
+
height: '2px',
|
|
893
|
+
backgroundColor: vars.colors.interactive.selected
|
|
894
|
+
},
|
|
895
|
+
[`&.${c['row--lastVisible']}`]: {
|
|
896
|
+
'&::before': {
|
|
897
|
+
bottom: 'calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)'
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
[`& .${c['row--beingDragged']}`]: {
|
|
902
|
+
backgroundColor: vars.colors.background.overlay,
|
|
903
|
+
color: vars.colors.foreground.disabled
|
|
865
904
|
}
|
|
866
905
|
};
|
|
867
906
|
return gridStyle;
|
|
@@ -577,6 +577,18 @@ export interface GridClasses {
|
|
|
577
577
|
* Styles applied to the floating special row reorder cell element when it is dragged.
|
|
578
578
|
*/
|
|
579
579
|
'row--dragging': string;
|
|
580
|
+
/**
|
|
581
|
+
* Styles applied to the row element when it is a drop target above.
|
|
582
|
+
*/
|
|
583
|
+
'row--dropAbove': string;
|
|
584
|
+
/**
|
|
585
|
+
* Styles applied to the row element when it is a drop target below.
|
|
586
|
+
*/
|
|
587
|
+
'row--dropBelow': string;
|
|
588
|
+
/**
|
|
589
|
+
* Styles applied to the row element when it is being dragged (entire row).
|
|
590
|
+
*/
|
|
591
|
+
'row--beingDragged': string;
|
|
580
592
|
/**
|
|
581
593
|
* Styles applied to the first visible row element on every page of the grid.
|
|
582
594
|
*/
|
|
@@ -3,4 +3,6 @@ import generateUtilityClasses from '@mui/utils/generateUtilityClasses';
|
|
|
3
3
|
export function getDataGridUtilityClass(slot) {
|
|
4
4
|
return generateUtilityClass('MuiDataGrid', slot);
|
|
5
5
|
}
|
|
6
|
-
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
6
|
+
export const gridClasses = generateUtilityClasses('MuiDataGrid', ['aiAssistantPanel', 'aiAssistantPanelHeader', 'aiAssistantPanelTitleContainer', 'aiAssistantPanelTitle', 'aiAssistantPanelBody', 'aiAssistantPanelEmptyText', 'aiAssistantPanelFooter', 'aiAssistantPanelConversation', 'aiAssistantPanelConversationList', 'aiAssistantPanelConversationTitle', 'aiAssistantPanelSuggestions', 'aiAssistantPanelSuggestionsList', 'aiAssistantPanelSuggestionsItem', 'aiAssistantPanelSuggestionsLabel', 'actionsCell', 'aggregationColumnHeader', 'aggregationColumnHeader--alignLeft', 'aggregationColumnHeader--alignCenter', 'aggregationColumnHeader--alignRight', 'aggregationColumnHeaderLabel', 'aggregationRowOverlayWrapper', 'autoHeight', 'autosizing', 'mainContent', 'withSidePanel', 'booleanCell', 'cell--editable', 'cell--editing', 'cell--flex', 'cell--textCenter', 'cell--textLeft', 'cell--textRight', 'cell--rangeTop', 'cell--rangeBottom', 'cell--rangeLeft', 'cell--rangeRight', 'cell--pinnedLeft', 'cell--pinnedRight', 'cell--selectionMode', 'cell', 'cellCheckbox', 'cellEmpty', 'cellSkeleton', 'cellOffsetLeft', 'checkboxInput', 'collapsible', 'collapsibleTrigger', 'collapsibleIcon', 'collapsiblePanel', 'columnHeader', 'columnHeader--alignCenter', 'columnHeader--alignLeft', 'columnHeader--alignRight', 'columnHeader--dragging', 'columnHeader--moving', 'columnHeader--numeric', 'columnHeader--sortable', 'columnHeader--sorted', 'columnHeader--filtered', 'columnHeader--pinnedLeft', 'columnHeader--pinnedRight', 'columnHeader--last', 'columnHeader--lastUnpinned', 'columnHeader--siblingFocused', 'columnHeader--filter', 'columnHeaderFilterInput', 'columnHeaderFilterOperatorLabel', 'columnHeaderCheckbox', 'columnHeaderDraggableContainer', 'columnHeaderTitle', 'columnHeaderTitleContainer', 'columnHeaderTitleContainerContent', 'columnHeader--filledGroup', 'columnHeader--emptyGroup', 'columnHeaders', 'columnSeparator--resizable', 'columnSeparator--resizing', 'columnSeparator--sideLeft', 'columnSeparator--sideRight', 'columnSeparator', 'columnsManagement', 'columnsManagementRow', 'columnsManagementHeader', 'columnsManagementSearchInput', 'columnsManagementFooter', 'columnsManagementScrollArea', 'columnsManagementEmptyText', 'container--top', 'container--bottom', 'detailPanel', 'detailPanelToggleCell', 'detailPanelToggleCell--expanded', 'footerCell', 'panel', 'panelHeader', 'panelWrapper', 'panelContent', 'panelFooter', 'paper', 'editBooleanCell', 'editInputCell', 'filler', 'filler--borderBottom', 'filler--pinnedLeft', 'filler--pinnedRight', 'filterForm', 'filterFormDeleteIcon', 'filterFormLogicOperatorInput', 'filterFormColumnInput', 'filterFormOperatorInput', 'filterFormValueInput', 'filterIcon', 'footerContainer', 'headerFilterRow', 'iconButtonContainer', 'iconSeparator', 'main', 'main--hasPinnedRight', 'main--hiddenContent', 'menu', 'menuIcon', 'menuIconButton', 'menuOpen', 'menuList', 'overlay', 'overlayWrapper', 'overlayWrapperInner', 'root', 'root--densityStandard', 'root--densityComfortable', 'root--densityCompact', 'root--disableUserSelection', 'root--noToolbar', 'row', 'row--editable', 'row--editing', 'row--firstVisible', 'row--lastVisible',
|
|
7
|
+
// TODO v9: Rename to `cell--dragging`
|
|
8
|
+
'row--dragging', 'row--dropAbove', 'row--dropBelow', 'row--beingDragged', 'row--dynamicHeight', 'row--detailPanelExpanded', 'row--borderBottom', 'rowReorderCellPlaceholder', 'rowCount', 'rowReorderCellContainer', 'rowReorderCell', 'rowReorderCell--draggable', 'rowReorderIcon', 'rowSkeleton', 'scrollArea--left', 'scrollArea--right', 'scrollArea--up', 'scrollArea--down', 'scrollArea', 'scrollbar', 'scrollbar--vertical', 'scrollbar--horizontal', 'scrollbarFiller', 'scrollbarFiller--header', 'scrollbarFiller--borderTop', 'scrollbarFiller--borderBottom', 'scrollbarFiller--pinnedRight', 'selectedRowCount', 'sortButton', 'sortIcon', 'shadowScrollArea', 'sidebar', 'sidebarHeader', 'toolbarContainer', 'toolbar', 'toolbarLabel', 'toolbarDivider', 'toolbarFilterList', 'toolbarQuickFilter', 'toolbarQuickFilterTrigger', 'toolbarQuickFilterControl', 'virtualScroller', 'virtualScroller--hasScrollX', 'virtualScrollerContent', 'virtualScrollerContent--overflowed', 'virtualScrollerRenderZone', 'withVerticalBorder', 'withBorderColor', 'cell--withRightBorder', 'cell--withLeftBorder', 'columnHeader--withRightBorder', 'columnHeader--withLeftBorder', 'treeDataGroupingCell', 'treeDataGroupingCellToggle', 'treeDataGroupingCellLoadingContainer', 'groupingCriteriaCell', 'groupingCriteriaCellToggle', 'groupingCriteriaCellLoadingContainer', 'pinnedRows', 'pinnedRows--top', 'pinnedRows--bottom', 'pivotPanelAvailableFields', 'pivotPanelField', 'pivotPanelField--sorted', 'pivotPanelFieldActionContainer', 'pivotPanelFieldCheckbox', 'pivotPanelFieldDragIcon', 'pivotPanelFieldList', 'pivotPanelFieldName', 'pivotPanelHeader', 'pivotPanelPlaceholder', 'pivotPanelScrollArea', 'pivotPanelSearchContainer', 'pivotPanelSection', 'pivotPanelSectionTitle', 'pivotPanelSections', 'pivotPanelSwitch', 'pivotPanelSwitchLabel', 'prompt', 'promptContent', 'promptText', 'promptFeedback', 'promptChangeList', 'promptChangesToggle', 'promptChangesToggleIcon', 'promptIcon', 'promptIconContainer', 'promptError', 'promptAction']);
|
|
@@ -138,5 +138,10 @@ export interface GridPipeProcessingPrivateApi {
|
|
|
138
138
|
* @param {GridPipeProcessorGroup} group The group to apply.
|
|
139
139
|
*/
|
|
140
140
|
requestPipeProcessorsApplication: (group: GridPipeProcessorGroup) => void;
|
|
141
|
+
/**
|
|
142
|
+
* Checks of there are any processors that have been updated and runs appliers for them.
|
|
143
|
+
* It is intended to be called in a useEffect in the top-level data grid hook (`useDataGridComponent`).
|
|
144
|
+
*/
|
|
145
|
+
runAppliersForPendingProcessors: () => void;
|
|
141
146
|
}
|
|
142
147
|
export {};
|