@mui/x-data-grid 8.10.2 → 8.11.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 +140 -13
- package/DataGrid/DataGrid.js +4 -2
- package/DataGrid/useDataGridComponent.d.ts +2 -1
- package/DataGrid/useDataGridComponent.js +2 -2
- package/colDef/gridDateColDef.js +7 -0
- package/components/GridColumnSortButton.js +1 -2
- package/components/GridColumnUnsortedIcon.d.ts +2 -3
- package/components/GridRow.js +11 -5
- package/components/cell/GridActionsCell.js +8 -4
- package/components/columnHeaders/GridColumnGroupHeader.js +13 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +12 -3
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +0 -14
- package/components/columnsManagement/GridColumnsManagement.js +7 -2
- package/components/containers/GridRootStyles.js +19 -6
- package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +3 -2
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -1
- package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +6 -9
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +4 -10
- package/components/virtualization/GridVirtualScrollerRenderZone.js +3 -10
- package/esm/DataGrid/DataGrid.js +4 -2
- package/esm/DataGrid/useDataGridComponent.d.ts +2 -1
- package/esm/DataGrid/useDataGridComponent.js +2 -2
- package/esm/colDef/gridDateColDef.js +7 -0
- package/esm/components/GridColumnSortButton.js +1 -2
- package/esm/components/GridColumnUnsortedIcon.d.ts +2 -3
- package/esm/components/GridRow.js +12 -6
- package/esm/components/cell/GridActionsCell.js +8 -4
- package/esm/components/columnHeaders/GridColumnGroupHeader.js +13 -1
- package/esm/components/columnHeaders/GridColumnHeaderItem.js +12 -3
- package/esm/components/columnHeaders/GridGenericColumnHeaderItem.js +0 -14
- package/esm/components/columnsManagement/GridColumnsManagement.js +6 -1
- package/esm/components/containers/GridRootStyles.js +19 -6
- package/esm/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.js +3 -2
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +1 -1
- package/esm/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +6 -9
- package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +4 -10
- package/esm/components/virtualization/GridVirtualScrollerRenderZone.js +3 -10
- package/esm/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +15 -0
- package/esm/hooks/features/editing/useGridCellEditing.js +1 -1
- package/esm/hooks/features/editing/useGridRowEditing.js +1 -1
- package/esm/hooks/features/filter/gridFilterSelector.d.ts +9 -1
- package/esm/hooks/features/filter/gridFilterSelector.js +12 -0
- package/esm/hooks/features/pagination/useGridPaginationModel.js +2 -2
- package/esm/hooks/features/rows/useGridRows.d.ts +2 -1
- package/esm/hooks/features/rows/useGridRows.js +6 -34
- package/esm/hooks/features/rows/useGridRowsOverridableMethods.d.ts +6 -0
- package/esm/hooks/features/rows/useGridRowsOverridableMethods.js +43 -0
- package/esm/hooks/features/scroll/useGridScroll.js +1 -1
- package/esm/hooks/utils/useGridConfiguration.d.ts +3 -1
- package/esm/index.js +1 -1
- package/esm/internals/index.d.ts +2 -1
- package/esm/internals/index.js +2 -1
- package/esm/material/index.js +2 -0
- package/esm/models/api/gridParamsApi.d.ts +3 -3
- package/esm/models/colDef/gridColDef.d.ts +4 -2
- package/esm/models/configuration/gridConfiguration.d.ts +6 -4
- package/esm/models/configuration/gridRowConfiguration.d.ts +11 -1
- package/esm/models/gridIconSlotsComponent.d.ts +6 -0
- package/esm/models/props/DataGridProps.d.ts +1 -1
- package/esm/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +0 -2
- package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +15 -0
- package/hooks/features/editing/useGridCellEditing.js +1 -1
- package/hooks/features/editing/useGridRowEditing.js +1 -1
- package/hooks/features/filter/gridFilterSelector.d.ts +9 -1
- package/hooks/features/filter/gridFilterSelector.js +13 -1
- package/hooks/features/pagination/useGridPaginationModel.js +2 -2
- package/hooks/features/rows/useGridRows.d.ts +2 -1
- package/hooks/features/rows/useGridRows.js +6 -34
- package/hooks/features/rows/useGridRowsOverridableMethods.d.ts +6 -0
- package/hooks/features/rows/useGridRowsOverridableMethods.js +52 -0
- package/hooks/features/scroll/useGridScroll.js +1 -1
- package/hooks/utils/useGridConfiguration.d.ts +3 -1
- package/index.js +1 -1
- package/internals/index.d.ts +2 -1
- package/internals/index.js +15 -0
- package/material/index.js +2 -0
- package/models/api/gridParamsApi.d.ts +3 -3
- package/models/colDef/gridColDef.d.ts +4 -2
- package/models/configuration/gridConfiguration.d.ts +6 -4
- package/models/configuration/gridRowConfiguration.d.ts +11 -1
- package/models/gridIconSlotsComponent.d.ts +6 -0
- package/models/props/DataGridProps.d.ts +1 -1
- package/package.json +11 -11
- package/utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.js +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,127 @@
|
|
|
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.11.0
|
|
9
|
+
|
|
10
|
+
_Aug 29, 2025_
|
|
11
|
+
|
|
12
|
+
We'd like to extend a big thank you to the 19 contributors who made this release possible. Here are some highlights ✨:
|
|
13
|
+
|
|
14
|
+
- 📊 Add new `SankeyChart`
|
|
15
|
+
|
|
16
|
+
<img height="300" alt="Screenshot 2025-07-24 at 12 54 33" src="https://github.com/user-attachments/assets/d77bcec1-044b-48c6-b37d-d7b74793b91c" />
|
|
17
|
+
|
|
18
|
+
- 🚀 Data Grid row grouping now supports row reordering
|
|
19
|
+
|
|
20
|
+
See the [Drag-and-drop group reordering](https://mui.com/x/react-data-grid/row-grouping/#drag-and-drop-group-reordering) section for more details.
|
|
21
|
+
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
Special thanks go out to the community members for their valuable contributions:
|
|
25
|
+
@dwrth, @lauri865, @Webini
|
|
26
|
+
|
|
27
|
+
The following are all team members who have contributed to this release:
|
|
28
|
+
@alexfauquette, @arminmeh, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @mapache-salvaje, @MBilalShafi, @michelengelen, @noraleonte, @oliviertassinari, @rita-codes, @romgrk, @sai6855, @siriwatknp
|
|
29
|
+
|
|
30
|
+
### Data Grid
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid@8.11.0`
|
|
33
|
+
|
|
34
|
+
- [DataGrid] Fix focused column header scroll jump (#19323) @lauri865
|
|
35
|
+
- [DataGrid] Bring `columnUnsortedIcon` slot back (#19268) @arminmeh
|
|
36
|
+
- [DataGrid] Do not add `menu` role to the empty actions menu (#19338) @arminmeh
|
|
37
|
+
- [DataGrid] Fix `columnsManagementRow` style override slot not working (#19097) @dwrth
|
|
38
|
+
- [DataGrid] Fix pagination state synchronization issue (#19290) @MBilalShafi
|
|
39
|
+
- [DataGrid] Fix scroll issue in R17 (#19265) @romgrk
|
|
40
|
+
- [DataGrid] Hide column separator of non-resizable pinned column (#19277) @arminmeh
|
|
41
|
+
|
|
42
|
+
#### `@mui/x-data-grid-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
43
|
+
|
|
44
|
+
Same changes as in `@mui/x-data-grid@8.11.0`, plus:
|
|
45
|
+
|
|
46
|
+
- [DataGridPro] Fix column menu sort when `multipleColumnsSortingMode="always"` (#19099) @MBilalShafi
|
|
47
|
+
- [DataGridPro] Keep the drop effect if `keepColumnPositionIfDraggedOutside` is enabled (#19372) @arminmeh
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-data-grid-premium@8.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
50
|
+
|
|
51
|
+
Same changes as in `@mui/x-data-grid-pro@8.11.0`, plus:
|
|
52
|
+
|
|
53
|
+
- [DataGridPremium] Fix `valueFormatter` issues when `rowGroupingColumnMode="single"` (#18967) @cherniavskii
|
|
54
|
+
- [DataGridPremium] Reordering support for row grouping (#18251) @MBilalShafi
|
|
55
|
+
|
|
56
|
+
### Date and Time Pickers
|
|
57
|
+
|
|
58
|
+
#### `@mui/x-date-pickers@8.11.0`
|
|
59
|
+
|
|
60
|
+
- [pickers] Fix Firefox bug causing crash when `startContainer` is a restricted object (#18772) @Webini
|
|
61
|
+
- [pickers] RTL not applied correctly for Calendar Systems examples (works in v7.x but broken in latest version) (#19287) @rita-codes
|
|
62
|
+
- [pickers] Use the locale week day on the Luxon adapter (#19230) @flaviendelangle
|
|
63
|
+
- [pickers] Fix display of placeholder when label is shrunk (#19318) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-date-pickers-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-date-pickers@8.11.0`.
|
|
68
|
+
|
|
69
|
+
### Charts
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts@8.11.0`
|
|
72
|
+
|
|
73
|
+
- [charts] Add `RadarAxis` component to render labels (#19240) @alexfauquette
|
|
74
|
+
- [charts] Handle item identifier with data (#19295) @JCQuintas
|
|
75
|
+
- [charts] Refactor optional chaining for props in PieChart, PieChartPro, and ScatterChartPro components (#19292) @sai6855
|
|
76
|
+
- [charts] Remove unused `fill` and `stroke` properties (#19316) @sai6855
|
|
77
|
+
- [charts] Correct `hideLegend` prop description in docs (#19371) @sai6855
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-charts-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
80
|
+
|
|
81
|
+
Same changes as in `@mui/x-charts@8.11.0`, plus:
|
|
82
|
+
|
|
83
|
+
- [charts-pro] Add new `SankeyChart` (#18895) @JCQuintas
|
|
84
|
+
|
|
85
|
+
### Tree View
|
|
86
|
+
|
|
87
|
+
#### `@mui/x-tree-view@8.11.0`
|
|
88
|
+
|
|
89
|
+
- [tree view] Improve the typing of the item's checkbox `slotProps` (#19247) @flaviendelangle
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-tree-view-pro@8.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
92
|
+
|
|
93
|
+
Same changes as in `@mui/x-tree-view@8.11.0`.
|
|
94
|
+
|
|
95
|
+
### Codemod
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-codemod@8.11.0`
|
|
98
|
+
|
|
99
|
+
Internal changes.
|
|
100
|
+
|
|
101
|
+
### Docs
|
|
102
|
+
|
|
103
|
+
- [docs][TreeView] Fix grammar and spelling mistakes (#19299) @mapache-salvaje
|
|
104
|
+
- [docs][DataGrid] Add pagination number formatting doc with a demo (#19221) @siriwatknp
|
|
105
|
+
- [docs][Charts] Correct some small grammar mistakes (#19297) @mapache-salvaje
|
|
106
|
+
- [docs][DataGrid] Correct grammar mistakes (#19298) @mapache-salvaje
|
|
107
|
+
- [docs][DataGrid] Make it clear that the API key for AI Assistant must be private (#19244) @oliviertassinari
|
|
108
|
+
|
|
109
|
+
### Core
|
|
110
|
+
|
|
111
|
+
- [code-infra] Remove unnecessary triggers from publish workflow (#19348) @Janpot
|
|
112
|
+
- [code-infra] Set up publishing from GitHub actions (#19264) @Janpot
|
|
113
|
+
- [code-infra] Update renovate, exclude infra packages from MUI group (#19288) @Janpot
|
|
114
|
+
- [internal] Add comment for Codspeed triggers (#19302) @oliviertassinari
|
|
115
|
+
- [internal] Fix changelog generation for infra tags (#19266) @oliviertassinari
|
|
116
|
+
- [internal] Remove dead repository field (#19301) @oliviertassinari
|
|
117
|
+
- [internal] Sentence case @oliviertassinari
|
|
118
|
+
- [internal] Update 8.10.1 changelog with missing changes (#19345) @cherniavskii
|
|
119
|
+
- [support-infra] Improve GitHub Action that check PRs labels (#19303) @oliviertassinari
|
|
120
|
+
|
|
121
|
+
### Miscellaneous
|
|
122
|
+
|
|
123
|
+
- [infra] Add `synchronize` to workflow triggers (#19342) @michelengelen
|
|
124
|
+
- [infra] Add charts docs folder in codowner (#19317) @alexfauquette
|
|
125
|
+
- [infra] Fix publish workflow complaint (#19346) @JCQuintas
|
|
126
|
+
- [infra] Migrate to use eslint without airbnb config (#19269) @brijeshb42
|
|
127
|
+
- [infra] Simplify release preparation script (#19351) @michelengelen
|
|
128
|
+
|
|
8
129
|
## 8.10.2
|
|
9
130
|
|
|
10
131
|
_Aug 20, 2025_
|
|
@@ -27,13 +148,13 @@ The following are all team members who have contributed to this release:
|
|
|
27
148
|
- [DataGrid] Fix column header sortable classname when using `disableColumnSorting` (#19222) @wilcoschoneveld
|
|
28
149
|
- [l10n] Improve finnish (fi-FI) locale (#19163) @lauri-heinonen-2025-04
|
|
29
150
|
|
|
30
|
-
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
151
|
+
#### `@mui/x-data-grid-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
31
152
|
|
|
32
153
|
Same changes as in `@mui/x-data-grid@8.10.2`, plus:
|
|
33
154
|
|
|
34
155
|
- [DataGridPro] Fix quick filter not working in List View mode (#19254) @cherniavskii
|
|
35
156
|
|
|
36
|
-
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link
|
|
157
|
+
#### `@mui/x-data-grid-premium@8.10.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
37
158
|
|
|
38
159
|
Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
39
160
|
|
|
@@ -43,7 +164,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.2`.
|
|
|
43
164
|
|
|
44
165
|
Internal changes.
|
|
45
166
|
|
|
46
|
-
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
167
|
+
#### `@mui/x-date-pickers-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
47
168
|
|
|
48
169
|
Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
49
170
|
|
|
@@ -53,7 +174,7 @@ Same changes as in `@mui/x-date-pickers@8.10.2`.
|
|
|
53
174
|
|
|
54
175
|
Internal changes.
|
|
55
176
|
|
|
56
|
-
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
177
|
+
#### `@mui/x-charts-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
57
178
|
|
|
58
179
|
Same changes as in `@mui/x-charts@8.10.2`.
|
|
59
180
|
|
|
@@ -63,7 +184,7 @@ Same changes as in `@mui/x-charts@8.10.2`.
|
|
|
63
184
|
|
|
64
185
|
- [tree view] Add `aria-hidden` to the Tree Item Checkbox (#19246) @flaviendelangle
|
|
65
186
|
|
|
66
|
-
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link
|
|
187
|
+
#### `@mui/x-tree-view-pro@8.10.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
188
|
|
|
68
189
|
Same changes as in `@mui/x-tree-view@8.10.2`.
|
|
69
190
|
|
|
@@ -95,13 +216,13 @@ Internal changes.
|
|
|
95
216
|
|
|
96
217
|
_Aug 15, 2025_
|
|
97
218
|
|
|
98
|
-
We'd like to extend a big thank you to the
|
|
219
|
+
We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
|
|
99
220
|
|
|
100
221
|
- 📊 Y-axes can now be grouped by category when using `band` and `point` scales.
|
|
101
222
|
- 📚 Documentation improvements
|
|
102
223
|
|
|
103
224
|
The following are all team members who have contributed to this release:
|
|
104
|
-
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk
|
|
225
|
+
@alexfauquette, @bernardobelchior, @Janpot, @JCQuintas, @mnajdova, @oliviertassinari, @prakhargupta1, @romgrk, @brijeshb42, @noraleonte, @rita-codes
|
|
105
226
|
|
|
106
227
|
### Data Grid
|
|
107
228
|
|
|
@@ -110,12 +231,14 @@ The following are all team members who have contributed to this release:
|
|
|
110
231
|
- [DataGrid] Fix scroll jumping (#19156) @romgrk
|
|
111
232
|
- [DataGrid] Fix scroll restoration (#19182) @romgrk
|
|
112
233
|
- [DataGrid] Fix "no row with id" error (#19193) @romgrk
|
|
234
|
+
- [DataGrid] Fix missing rows in the print export window (#19159) @cherniavskii
|
|
235
|
+
- [DataGrid] Fix broken scroll (#19178) @romgrk
|
|
113
236
|
|
|
114
|
-
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
237
|
+
#### `@mui/x-data-grid-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
115
238
|
|
|
116
239
|
Same changes as in `@mui/x-data-grid@8.10.1`.
|
|
117
240
|
|
|
118
|
-
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link
|
|
241
|
+
#### `@mui/x-data-grid-premium@8.10.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
119
242
|
|
|
120
243
|
Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
121
244
|
|
|
@@ -125,7 +248,7 @@ Same changes as in `@mui/x-data-grid-pro@8.10.1`.
|
|
|
125
248
|
|
|
126
249
|
Internal changes.
|
|
127
250
|
|
|
128
|
-
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link
|
|
251
|
+
#### `@mui/x-date-pickers-pro@8.10.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
129
252
|
|
|
130
253
|
Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
131
254
|
|
|
@@ -141,8 +264,10 @@ Same changes as in `@mui/x-date-pickers@8.10.0`.
|
|
|
141
264
|
- [charts] Fix default axis highlight for axes without data attribute (#18985) @alexfauquette
|
|
142
265
|
- [charts] Fix tooltip mark unexpected wrapping in mobile (#19122) @bernardobelchior
|
|
143
266
|
- [charts] Prevent overflow on charts tooltip (#19123) @bernardobelchior
|
|
267
|
+
- [charts] Add demo for log-scale ticks without labels (#19152) @bernardobelchior
|
|
268
|
+
- [charts] Update animation customization docs (#19185) @bernardobelchior
|
|
144
269
|
|
|
145
|
-
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
270
|
+
#### `@mui/x-charts-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
146
271
|
|
|
147
272
|
Same changes as in `@mui/x-charts@8.10.1`.
|
|
148
273
|
|
|
@@ -150,9 +275,10 @@ Same changes as in `@mui/x-charts@8.10.1`.
|
|
|
150
275
|
|
|
151
276
|
#### `@mui/x-tree-view@8.10.1`
|
|
152
277
|
|
|
153
|
-
|
|
278
|
+
- [tree view] Fix root not loading from cache on remount (#19088) @noraleonte
|
|
279
|
+
- [tree view] Don't overwrite childrenIds when collapsed to preserve indeterminate state of the parent (#19196) @rita-codes
|
|
154
280
|
|
|
155
|
-
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link
|
|
281
|
+
#### `@mui/x-tree-view-pro@8.10.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
156
282
|
|
|
157
283
|
Same changes as in `@mui/x-tree-view@8.10.1`.
|
|
158
284
|
|
|
@@ -182,6 +308,7 @@ Internal changes.
|
|
|
182
308
|
- [code-infra] Fix `fs-extra` removal from `formattedTSDemos` script (#19132) @bernardobelchior
|
|
183
309
|
- [code-infra] Remove unused code and dependency (#19139) @bernardobelchior
|
|
184
310
|
- [code-infra] Replace `fs-extra` with `node:fs` where possible (#19127) @bernardobelchior
|
|
311
|
+
- [code-infra] Migrate build command to code-infra (#19006) @brijeshb42
|
|
185
312
|
- [internal] Edit, keep `lockFileMaintenance` simple @oliviertassinari
|
|
186
313
|
- [internal] Fix writing style action name @oliviertassinari
|
|
187
314
|
- [internal] Make it clear that `lockFileMaintenance` is enabled @oliviertassinari
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -14,6 +14,7 @@ var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
|
14
14
|
var _components = require("../components");
|
|
15
15
|
var _useGridAriaAttributes = require("../hooks/utils/useGridAriaAttributes");
|
|
16
16
|
var _useGridRowAriaAttributes = require("../hooks/features/rows/useGridRowAriaAttributes");
|
|
17
|
+
var _useGridRowsOverridableMethods = require("../hooks/features/rows/useGridRowsOverridableMethods");
|
|
17
18
|
var _GridContextProvider = require("../context/GridContextProvider");
|
|
18
19
|
var _useDataGridComponent = require("./useDataGridComponent");
|
|
19
20
|
var _useDataGridProps = require("./useDataGridProps");
|
|
@@ -26,13 +27,14 @@ const configuration = {
|
|
|
26
27
|
useCSSVariables: _variables.useMaterialCSSVariables,
|
|
27
28
|
useGridAriaAttributes: _useGridAriaAttributes.useGridAriaAttributes,
|
|
28
29
|
useGridRowAriaAttributes: _useGridRowAriaAttributes.useGridRowAriaAttributes,
|
|
30
|
+
useGridRowsOverridableMethods: _useGridRowsOverridableMethods.useGridRowsOverridableMethods,
|
|
29
31
|
useCellAggregationResult: () => null
|
|
30
32
|
}
|
|
31
33
|
};
|
|
32
34
|
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
33
35
|
const props = (0, _useDataGridProps.useDataGridProps)(inProps);
|
|
34
36
|
const privateApiRef = (0, _useGridApiInitialization.useGridApiInitialization)(props.apiRef, props);
|
|
35
|
-
(0, _useDataGridComponent.useDataGridComponent)(privateApiRef, props);
|
|
37
|
+
(0, _useDataGridComponent.useDataGridComponent)(privateApiRef, props, configuration);
|
|
36
38
|
if (process.env.NODE_ENV !== 'production') {
|
|
37
39
|
(0, _propValidation.validateProps)(props, _propValidation.propValidatorsDataGrid);
|
|
38
40
|
}
|
|
@@ -587,7 +589,7 @@ DataGridRaw.propTypes = {
|
|
|
587
589
|
*/
|
|
588
590
|
onPreferencePanelOpen: _propTypes.default.func,
|
|
589
591
|
/**
|
|
590
|
-
* Callback called when `processRowUpdate` throws an error or rejects.
|
|
592
|
+
* Callback called when `processRowUpdate()` throws an error or rejects.
|
|
591
593
|
* @param {any} error The error thrown.
|
|
592
594
|
*/
|
|
593
595
|
onProcessRowUpdateError: _propTypes.default.func,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
2
|
import { DataGridProcessedProps } from "../models/props/DataGridProps.js";
|
|
3
3
|
import { GridPrivateApiCommunity } from "../models/api/gridApiCommunity.js";
|
|
4
|
-
|
|
4
|
+
import { GridConfiguration } from "../models/configuration/gridConfiguration.js";
|
|
5
|
+
export declare const useDataGridComponent: (apiRef: RefObject<GridPrivateApiCommunity>, props: DataGridProcessedProps, configuration: GridConfiguration) => void;
|
|
@@ -41,7 +41,7 @@ var _useGridRowSpanning = require("../hooks/features/rows/useGridRowSpanning");
|
|
|
41
41
|
var _useGridListView = require("../hooks/features/listView/useGridListView");
|
|
42
42
|
var _useGridProps = require("../hooks/core/useGridProps");
|
|
43
43
|
var _useGridDataSource = require("../hooks/features/dataSource/useGridDataSource");
|
|
44
|
-
const useDataGridComponent = (apiRef, props) => {
|
|
44
|
+
const useDataGridComponent = (apiRef, props, configuration) => {
|
|
45
45
|
(0, _useGridInitialization.useGridInitialization)(apiRef, props);
|
|
46
46
|
|
|
47
47
|
/**
|
|
@@ -76,7 +76,7 @@ const useDataGridComponent = (apiRef, props) => {
|
|
|
76
76
|
(0, _useGridKeyboardNavigation.useGridKeyboardNavigation)(apiRef, props);
|
|
77
77
|
(0, _useGridRowSelection.useGridRowSelection)(apiRef, props);
|
|
78
78
|
(0, _useGridColumns.useGridColumns)(apiRef, props);
|
|
79
|
-
(0, _useGridRows.useGridRows)(apiRef, props);
|
|
79
|
+
(0, _useGridRows.useGridRows)(apiRef, props, configuration);
|
|
80
80
|
(0, _useGridRowSpanning.useGridRowSpanning)(apiRef, props);
|
|
81
81
|
(0, _useGridParamsApi.useGridParamsApi)(apiRef, props);
|
|
82
82
|
(0, _useGridColumnSpanning.useGridColumnSpanning)(apiRef);
|
package/colDef/gridDateColDef.js
CHANGED
|
@@ -11,6 +11,7 @@ var _gridDateOperators = require("./gridDateOperators");
|
|
|
11
11
|
var _gridStringColDef = require("./gridStringColDef");
|
|
12
12
|
var _GridEditDateCell = require("../components/cell/GridEditDateCell");
|
|
13
13
|
var _gridPropsSelectors = require("../hooks/core/gridPropsSelectors");
|
|
14
|
+
var _gridRowsUtils = require("../hooks/features/rows/gridRowsUtils");
|
|
14
15
|
function throwIfNotDateObject({
|
|
15
16
|
value,
|
|
16
17
|
columnType,
|
|
@@ -26,6 +27,9 @@ const gridDateFormatter = (value, row, column, apiRef) => {
|
|
|
26
27
|
return '';
|
|
27
28
|
}
|
|
28
29
|
const rowId = (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row);
|
|
30
|
+
if ((0, _gridRowsUtils.isAutogeneratedRow)(row) && !(value instanceof Date)) {
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
29
33
|
throwIfNotDateObject({
|
|
30
34
|
value,
|
|
31
35
|
columnType: 'date',
|
|
@@ -40,6 +44,9 @@ const gridDateTimeFormatter = (value, row, column, apiRef) => {
|
|
|
40
44
|
return '';
|
|
41
45
|
}
|
|
42
46
|
const rowId = (0, _gridPropsSelectors.gridRowIdSelector)(apiRef, row);
|
|
47
|
+
if ((0, _gridRowsUtils.isAutogeneratedRow)(row) && !(value instanceof Date)) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
43
50
|
throwIfNotDateObject({
|
|
44
51
|
value,
|
|
45
52
|
columnType: 'dateTime',
|
|
@@ -17,7 +17,6 @@ var _useGridApiContext = require("../hooks/utils/useGridApiContext");
|
|
|
17
17
|
var _gridClasses = require("../constants/gridClasses");
|
|
18
18
|
var _useGridRootProps = require("../hooks/utils/useGridRootProps");
|
|
19
19
|
var _cssVariables = require("../constants/cssVariables");
|
|
20
|
-
var _GridColumnUnsortedIcon = require("./GridColumnUnsortedIcon");
|
|
21
20
|
var _assert = require("../utils/assert");
|
|
22
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
22
|
const _excluded = ["direction", "index", "sortingOrder", "disabled", "className"];
|
|
@@ -48,7 +47,7 @@ function getIcon(icons, direction, className, sortingOrder) {
|
|
|
48
47
|
} else if (direction === 'desc') {
|
|
49
48
|
Icon = icons.columnSortedDescendingIcon;
|
|
50
49
|
} else {
|
|
51
|
-
Icon =
|
|
50
|
+
Icon = icons.columnUnsortedIcon;
|
|
52
51
|
iconProps.sortingOrder = sortingOrder;
|
|
53
52
|
}
|
|
54
53
|
return Icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, (0, _extends2.default)({
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { GridBaseIconProps } from "../models/gridSlotsComponentsProps.js";
|
|
3
3
|
import { GridSortDirection } from "../models/gridSortModel.js";
|
|
4
|
-
interface GridColumnUnsortedIconProps extends GridBaseIconProps {
|
|
4
|
+
export interface GridColumnUnsortedIconProps extends GridBaseIconProps {
|
|
5
5
|
sortingOrder: GridSortDirection[];
|
|
6
6
|
}
|
|
7
|
-
export declare const GridColumnUnsortedIcon: React.NamedExoticComponent<GridColumnUnsortedIconProps>;
|
|
8
|
-
export {};
|
|
7
|
+
export declare const GridColumnUnsortedIcon: React.NamedExoticComponent<GridColumnUnsortedIconProps>;
|
package/components/GridRow.js
CHANGED
|
@@ -39,8 +39,11 @@ var _useGridPrivateApiContext = require("../hooks/utils/useGridPrivateApiContext
|
|
|
39
39
|
var _createSelector = require("../utils/createSelector");
|
|
40
40
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
41
41
|
const _excluded = ["selected", "rowId", "row", "index", "style", "rowHeight", "className", "visibleColumns", "pinnedColumns", "offsetLeft", "columnsTotalWidth", "firstColumnIndex", "lastColumnIndex", "focusedColumnIndex", "isFirstVisible", "isLastVisible", "isNotVisible", "showBottomBorder", "scrollbarWidth", "gridHasFiller", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave", "onMouseOut", "onMouseOver"];
|
|
42
|
-
const isRowReorderingEnabledSelector = (0, _createSelector.createSelector)(_gridEditingSelectors.gridEditRowsStateSelector, (editRows,
|
|
43
|
-
|
|
42
|
+
const isRowReorderingEnabledSelector = (0, _createSelector.createSelector)(_gridEditingSelectors.gridEditRowsStateSelector, (editRows, {
|
|
43
|
+
rowReordering,
|
|
44
|
+
treeData
|
|
45
|
+
}) => {
|
|
46
|
+
if (!rowReordering || treeData) {
|
|
44
47
|
return false;
|
|
45
48
|
}
|
|
46
49
|
const isEditingRows = !(0, _isObjectEmpty.isObjectEmpty)(editRows);
|
|
@@ -82,10 +85,13 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
82
85
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
83
86
|
const currentPage = (0, _useGridVisibleRows.useGridVisibleRows)(apiRef, rootProps);
|
|
84
87
|
const sortModel = (0, _useGridSelector.useGridSelector)(apiRef, _gridSortingSelector.gridSortModelSelector);
|
|
85
|
-
const treeDepth = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowsSelector.gridRowMaximumTreeDepthSelector);
|
|
86
88
|
const columnPositions = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnPositionsSelector);
|
|
87
89
|
const rowReordering = rootProps.rowReordering;
|
|
88
|
-
const
|
|
90
|
+
const treeData = rootProps.treeData;
|
|
91
|
+
const isRowReorderingEnabled = (0, _useGridSelector.useGridSelector)(apiRef, isRowReorderingEnabledSelector, {
|
|
92
|
+
rowReordering,
|
|
93
|
+
treeData
|
|
94
|
+
});
|
|
89
95
|
const isRowDragActive = (0, _useGridSelector.useGridSelector)(apiRef, _gridRowReorderSelector.gridIsRowDragActiveSelector);
|
|
90
96
|
const handleRef = (0, _useForkRef.default)(ref, refProp);
|
|
91
97
|
const rowNode = (0, _gridRowsSelector.gridRowNodeSelector)(apiRef, rowId);
|
|
@@ -238,7 +244,7 @@ const GridRow = (0, _forwardRef.forwardRef)(function GridRow(props, refProp) {
|
|
|
238
244
|
// fixes https://github.com/mui/mui-x/issues/11126
|
|
239
245
|
const isReorderCell = column.field === '__reorder__';
|
|
240
246
|
const canReorderColumn = !(disableColumnReorder || column.disableReorder);
|
|
241
|
-
const canReorderRow = isRowReorderingEnabled && !sortModel.length
|
|
247
|
+
const canReorderRow = isRowReorderingEnabled && !sortModel.length;
|
|
242
248
|
const disableDragEvents = !(canReorderColumn || isReorderCell && canReorderRow || isRowDragActive);
|
|
243
249
|
const cellIsNotVisible = pinnedPosition === _constants.PinnedColumnPosition.VIRTUAL;
|
|
244
250
|
const showLeftBorder = (0, _cellBorderUtils.shouldCellShowLeftBorder)(pinnedPosition, indexInSection);
|
|
@@ -149,13 +149,17 @@ function GridActionsCell(props) {
|
|
|
149
149
|
setFocusedButtonIndex(newIndex);
|
|
150
150
|
}
|
|
151
151
|
};
|
|
152
|
+
|
|
153
|
+
// role="menu" requires at least one child element
|
|
154
|
+
const attributes = numberOfButtons > 0 ? {
|
|
155
|
+
role: 'menu',
|
|
156
|
+
onKeyDown: handleRootKeyDown
|
|
157
|
+
} : undefined;
|
|
152
158
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
153
|
-
role: "menu",
|
|
154
159
|
ref: rootRef,
|
|
155
160
|
tabIndex: -1,
|
|
156
|
-
className: _gridClasses.gridClasses.actionsCell
|
|
157
|
-
|
|
158
|
-
}, other, {
|
|
161
|
+
className: _gridClasses.gridClasses.actionsCell
|
|
162
|
+
}, attributes, other, {
|
|
159
163
|
children: [iconButtons.map((button, index) => /*#__PURE__*/React.cloneElement(button, {
|
|
160
164
|
key: index,
|
|
161
165
|
touchRippleRef: handleTouchRippleRef(index),
|
|
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
12
12
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
13
13
|
var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"));
|
|
14
14
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
15
|
+
var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
|
|
15
16
|
var _gridClasses = require("../../constants/gridClasses");
|
|
16
17
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
17
18
|
var _gridColumnGroupsSelector = require("../../hooks/features/columnGrouping/gridColumnGroupsSelector");
|
|
@@ -96,7 +97,18 @@ function GridColumnGroupHeader(props) {
|
|
|
96
97
|
if (hasFocus) {
|
|
97
98
|
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
98
99
|
const elementToFocus = focusableElement || headerCellRef.current;
|
|
99
|
-
elementToFocus
|
|
100
|
+
if (!elementToFocus) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
|
|
104
|
+
elementToFocus.focus({
|
|
105
|
+
preventScroll: true
|
|
106
|
+
});
|
|
107
|
+
} else {
|
|
108
|
+
const scrollPosition = apiRef.current.getScrollPosition();
|
|
109
|
+
elementToFocus.focus();
|
|
110
|
+
apiRef.current.scroll(scrollPosition);
|
|
111
|
+
}
|
|
100
112
|
}
|
|
101
113
|
}, [apiRef, hasFocus]);
|
|
102
114
|
const publish = React.useCallback(eventName => event => {
|
|
@@ -15,6 +15,7 @@ var _composeClasses = _interopRequireDefault(require("@mui/utils/composeClasses"
|
|
|
15
15
|
var _useId = _interopRequireDefault(require("@mui/utils/useId"));
|
|
16
16
|
var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
17
17
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
18
|
+
var _doesSupportPreventScroll = require("../../utils/doesSupportPreventScroll");
|
|
18
19
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
19
20
|
var _ColumnHeaderMenuIcon = require("./ColumnHeaderMenuIcon");
|
|
20
21
|
var _GridColumnHeaderMenu = require("../menu/columnMenu/GridColumnHeaderMenu");
|
|
@@ -174,9 +175,17 @@ function GridColumnHeaderItem(props) {
|
|
|
174
175
|
if (hasFocus && !columnMenuState.open) {
|
|
175
176
|
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
176
177
|
const elementToFocus = focusableElement || headerCellRef.current;
|
|
177
|
-
elementToFocus
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
if (!elementToFocus) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
if ((0, _doesSupportPreventScroll.doesSupportPreventScroll)()) {
|
|
182
|
+
elementToFocus.focus({
|
|
183
|
+
preventScroll: true
|
|
184
|
+
});
|
|
185
|
+
} else {
|
|
186
|
+
const scrollPosition = apiRef.current.getScrollPosition();
|
|
187
|
+
elementToFocus.focus();
|
|
188
|
+
apiRef.current.scroll(scrollPosition);
|
|
180
189
|
}
|
|
181
190
|
}
|
|
182
191
|
}, [apiRef, hasFocus]);
|
|
@@ -13,7 +13,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
13
13
|
var _clsx = _interopRequireDefault(require("clsx"));
|
|
14
14
|
var _useForkRef = _interopRequireDefault(require("@mui/utils/useForkRef"));
|
|
15
15
|
var _forwardRef = require("@mui/x-internals/forwardRef");
|
|
16
|
-
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
17
16
|
var _GridColumnHeaderTitle = require("./GridColumnHeaderTitle");
|
|
18
17
|
var _GridColumnHeaderSeparator = require("./GridColumnHeaderSeparator");
|
|
19
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
@@ -26,7 +25,6 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _f
|
|
|
26
25
|
height,
|
|
27
26
|
isResizing,
|
|
28
27
|
sortDirection,
|
|
29
|
-
hasFocus,
|
|
30
28
|
tabIndex,
|
|
31
29
|
separatorSide,
|
|
32
30
|
isDraggable,
|
|
@@ -44,7 +42,6 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _f
|
|
|
44
42
|
style
|
|
45
43
|
} = props,
|
|
46
44
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
47
|
-
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
48
45
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
49
46
|
const headerCellRef = React.useRef(null);
|
|
50
47
|
const handleRef = (0, _useForkRef.default)(headerCellRef, ref);
|
|
@@ -52,17 +49,6 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _f
|
|
|
52
49
|
if (sortDirection != null) {
|
|
53
50
|
ariaSort = sortDirection === 'asc' ? 'ascending' : 'descending';
|
|
54
51
|
}
|
|
55
|
-
React.useLayoutEffect(() => {
|
|
56
|
-
const columnMenuState = apiRef.current.state.columnMenu;
|
|
57
|
-
if (hasFocus && !columnMenuState.open) {
|
|
58
|
-
const focusableElement = headerCellRef.current.querySelector('[tabindex="0"]');
|
|
59
|
-
const elementToFocus = focusableElement || headerCellRef.current;
|
|
60
|
-
elementToFocus?.focus();
|
|
61
|
-
if (apiRef.current.columnHeadersContainerRef?.current) {
|
|
62
|
-
apiRef.current.columnHeadersContainerRef.current.scrollLeft = 0;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
}, [apiRef, hasFocus]);
|
|
66
52
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
|
|
67
53
|
className: (0, _clsx.default)(classes.root, headerClassName),
|
|
68
54
|
style: (0, _extends2.default)({}, style, {
|
|
@@ -185,7 +185,8 @@ function GridColumnsManagement(props) {
|
|
|
185
185
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(GridColumnsManagementBody, {
|
|
186
186
|
className: classes.root,
|
|
187
187
|
ownerState: rootProps,
|
|
188
|
-
children: [currentColumns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
188
|
+
children: [currentColumns.map(column => /*#__PURE__*/(0, _jsxRuntime.jsx)(GridColumnsManagementRow, (0, _extends2.default)({
|
|
189
|
+
as: rootProps.slots.baseCheckbox,
|
|
189
190
|
className: classes.row,
|
|
190
191
|
disabled: column.hideable === false || pivotActive,
|
|
191
192
|
checked: columnVisibilityModel[column.field] !== false,
|
|
@@ -315,4 +316,8 @@ const GridColumnsManagementEmptyText = (0, _styles.styled)('div', {
|
|
|
315
316
|
padding: _cssVariables.vars.spacing(1, 0),
|
|
316
317
|
alignSelf: 'center',
|
|
317
318
|
font: _cssVariables.vars.typography.font.body
|
|
318
|
-
});
|
|
319
|
+
});
|
|
320
|
+
const GridColumnsManagementRow = (0, _styles.styled)(_assert.NotRendered, {
|
|
321
|
+
name: 'MuiDataGrid',
|
|
322
|
+
slot: 'ColumnsManagementRow'
|
|
323
|
+
})();
|
|
@@ -547,6 +547,11 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
547
547
|
opacity: 0.5
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
|
+
// Hide the column separator when the column has border and it is not resizable
|
|
551
|
+
// In this case, this column separator may block interaction with the separator from the adjacent column that is resizable
|
|
552
|
+
[`& .${_gridClasses.gridClasses['columnHeader--withLeftBorder']} .${_gridClasses.gridClasses['columnSeparator--sideLeft']}:not(.${_gridClasses.gridClasses['columnSeparator--resizable']}), & .${_gridClasses.gridClasses['columnHeader--withRightBorder']} .${_gridClasses.gridClasses['columnSeparator--sideRight']}:not(.${_gridClasses.gridClasses['columnSeparator--resizable']})`]: {
|
|
553
|
+
display: 'none'
|
|
554
|
+
},
|
|
550
555
|
[`& .${_gridClasses.gridClasses['columnSeparator--sideLeft']}`]: {
|
|
551
556
|
left: columnSeparatorOffset
|
|
552
557
|
},
|
|
@@ -796,7 +801,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
796
801
|
[`& .${_gridClasses.gridClasses.rowReorderCellPlaceholder}`]: {
|
|
797
802
|
display: 'none'
|
|
798
803
|
},
|
|
799
|
-
[`& .${_gridClasses.gridClasses['columnHeader--dragging']}
|
|
804
|
+
[`& .${_gridClasses.gridClasses['columnHeader--dragging']}`]: {
|
|
800
805
|
background: _cssVariables.vars.colors.background.overlay,
|
|
801
806
|
padding: '0 12px',
|
|
802
807
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
@@ -806,8 +811,11 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
806
811
|
background: _cssVariables.vars.colors.background.overlay,
|
|
807
812
|
padding: '0 12px',
|
|
808
813
|
borderRadius: 'var(--unstable_DataGrid-radius)',
|
|
809
|
-
|
|
814
|
+
border: '1px solid var(--DataGrid-rowBorderColor)',
|
|
815
|
+
color: _cssVariables.vars.colors.foreground.base,
|
|
816
|
+
transform: 'translateZ(0)',
|
|
810
817
|
[`& .${_gridClasses.gridClasses.rowReorderCellPlaceholder}`]: {
|
|
818
|
+
padding: '0 6px',
|
|
811
819
|
display: 'flex'
|
|
812
820
|
}
|
|
813
821
|
},
|
|
@@ -883,6 +891,7 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
883
891
|
[`& .${_gridClasses.gridClasses['row--dropAbove']}`]: {
|
|
884
892
|
position: 'relative',
|
|
885
893
|
'&::before': {
|
|
894
|
+
pointerEvents: 'none',
|
|
886
895
|
content: '""',
|
|
887
896
|
position: 'absolute',
|
|
888
897
|
top: 0,
|
|
@@ -894,7 +903,9 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
894
903
|
},
|
|
895
904
|
[`& .${_gridClasses.gridClasses['row--dropBelow']}`]: {
|
|
896
905
|
position: 'relative',
|
|
897
|
-
'&::
|
|
906
|
+
'&::after': {
|
|
907
|
+
zIndex: 100,
|
|
908
|
+
pointerEvents: 'none',
|
|
898
909
|
content: '""',
|
|
899
910
|
position: 'absolute',
|
|
900
911
|
bottom: '-2px',
|
|
@@ -904,14 +915,16 @@ const GridRootStyles = exports.GridRootStyles = (0, _styles.styled)('div', {
|
|
|
904
915
|
backgroundColor: _cssVariables.vars.colors.interactive.selected
|
|
905
916
|
},
|
|
906
917
|
[`&.${_gridClasses.gridClasses['row--lastVisible']}`]: {
|
|
907
|
-
'&::
|
|
918
|
+
'&::after': {
|
|
908
919
|
bottom: 'calc(var(--DataGrid-hasScrollY) * 0px + (1 - var(--DataGrid-hasScrollY)) * -2px)'
|
|
909
920
|
}
|
|
910
921
|
}
|
|
911
922
|
},
|
|
912
923
|
[`& .${_gridClasses.gridClasses['row--beingDragged']}`]: {
|
|
913
|
-
|
|
914
|
-
|
|
924
|
+
color: _cssVariables.vars.colors.foreground.disabled,
|
|
925
|
+
'&:hover': {
|
|
926
|
+
backgroundColor: 'transparent'
|
|
927
|
+
}
|
|
915
928
|
}
|
|
916
929
|
};
|
|
917
930
|
return gridStyle;
|
|
@@ -32,8 +32,9 @@ function GridColumnMenuSortItem(props) {
|
|
|
32
32
|
const onSortMenuItemClick = React.useCallback(event => {
|
|
33
33
|
onClick(event);
|
|
34
34
|
const direction = event.currentTarget.getAttribute('data-value') || null;
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
const allowMultipleSorting = rootProps.multipleColumnsSortingMode === 'always';
|
|
36
|
+
apiRef.current.sortColumn(colDef.field, direction === sortDirection ? null : direction, allowMultipleSorting);
|
|
37
|
+
}, [apiRef, colDef, onClick, sortDirection, rootProps.multipleColumnsSortingMode]);
|
|
37
38
|
if (rootProps.disableColumnSorting || !colDef || !colDef.sortable || !sortingOrder.some(item => !!item)) {
|
|
38
39
|
return null;
|
|
39
40
|
}
|
|
@@ -5,7 +5,7 @@ import type { ValueOptions } from "../../../models/colDef/gridColDef.js";
|
|
|
5
5
|
export type GridFilterInputMultipleSingleSelectProps = GridFilterInputValueProps<Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options'>> & {
|
|
6
6
|
type?: 'singleSelect';
|
|
7
7
|
};
|
|
8
|
-
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element;
|
|
8
|
+
declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): React.JSX.Element | null;
|
|
9
9
|
declare namespace GridFilterInputMultipleSingleSelect {
|
|
10
10
|
var propTypes: any;
|
|
11
11
|
}
|