@mui/x-data-grid 9.10.1 → 9.12.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 +283 -0
- package/DataGrid/DataGrid.js +3 -1
- package/DataGrid/DataGrid.mjs +3 -1
- package/DataGrid/useDataGridProps.d.mts +1 -1
- package/DataGrid/useDataGridProps.d.ts +1 -1
- package/README.md +1 -11
- package/components/cell/GridCell.js +14 -1
- package/components/cell/GridCell.mjs +14 -1
- package/components/columnHeaders/GridBaseColumnHeaders.js +1 -1
- package/components/columnHeaders/GridBaseColumnHeaders.mjs +1 -1
- package/components/columnHeaders/GridColumnHeaderItem.js +4 -0
- package/components/columnHeaders/GridColumnHeaderItem.mjs +4 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.mts +7 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.d.ts +7 -0
- package/components/columnHeaders/GridGenericColumnHeaderItem.js +5 -4
- package/components/columnHeaders/GridGenericColumnHeaderItem.mjs +5 -4
- package/components/panel/filterPanel/GridFilterInputSingleSelect.js +18 -6
- package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +18 -6
- package/components/toolbarV8/Toolbar.js +2 -125
- package/components/toolbarV8/Toolbar.mjs +2 -125
- package/components/toolbarV8/ToolbarButton.js +11 -50
- package/components/toolbarV8/ToolbarButton.mjs +11 -50
- package/constants/gridClasses.d.mts +12 -0
- package/constants/gridClasses.d.ts +12 -0
- package/constants/gridClasses.js +1 -1
- package/constants/gridClasses.mjs +1 -1
- package/constants/localeTextConstants.js +4 -0
- package/constants/localeTextConstants.mjs +4 -0
- package/hooks/core/useGridApiInitialization.js +5 -1
- package/hooks/core/useGridApiInitialization.mjs +5 -1
- package/hooks/core/useGridStateInitialization.js +3 -1
- package/hooks/core/useGridStateInitialization.mjs +3 -1
- package/hooks/core/useGridVirtualizer.js +3 -0
- package/hooks/core/useGridVirtualizer.mjs +3 -0
- package/hooks/features/columnResize/useGridColumnResize.js +5 -0
- package/hooks/features/columnResize/useGridColumnResize.mjs +5 -0
- package/hooks/features/columns/gridColumnsUtils.d.mts +1 -1
- package/hooks/features/columns/gridColumnsUtils.d.ts +1 -1
- package/hooks/features/columns/gridColumnsUtils.js +2 -2
- package/hooks/features/columns/gridColumnsUtils.mjs +2 -2
- package/hooks/features/dataSource/gridDataSourceSelector.js +6 -2
- package/hooks/features/dataSource/gridDataSourceSelector.mjs +6 -2
- package/hooks/features/dataSource/useGridDataSourceBase.js +47 -5
- package/hooks/features/dataSource/useGridDataSourceBase.mjs +47 -5
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.d.mts +9 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.d.ts +9 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.js +57 -0
- package/hooks/features/dataSource/useGridDataSourceFilterModelChange.mjs +49 -0
- package/hooks/features/editing/useGridCellEditing.js +3 -1
- package/hooks/features/editing/useGridCellEditing.mjs +3 -1
- package/hooks/features/editing/useGridRowEditing.js +3 -1
- package/hooks/features/editing/useGridRowEditing.mjs +3 -1
- package/hooks/features/filter/gridFilterUtils.d.mts +13 -0
- package/hooks/features/filter/gridFilterUtils.d.ts +13 -0
- package/hooks/features/filter/gridFilterUtils.js +32 -1
- package/hooks/features/filter/gridFilterUtils.mjs +29 -1
- package/hooks/features/filter/useGridFilter.js +1 -21
- package/hooks/features/filter/useGridFilter.mjs +2 -22
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.js +1 -1
- package/hooks/features/headerFiltering/gridHeaderFilteringSelectors.mjs +1 -1
- package/hooks/features/rows/gridRowsUtils.js +17 -1
- package/hooks/features/rows/gridRowsUtils.mjs +17 -1
- package/hooks/features/rows/useGridRowSpanning.js +5 -0
- package/hooks/features/rows/useGridRowSpanning.mjs +5 -0
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.mts +1 -1
- package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +1 -1
- package/hooks/utils/useGridEvent.d.mts +2 -2
- package/hooks/utils/useGridEvent.d.ts +2 -2
- package/hooks/utils/useGridEvent.js +2 -0
- package/hooks/utils/useGridEvent.mjs +2 -0
- package/index.js +1 -1
- package/index.mjs +1 -1
- package/internals/index.d.mts +2 -0
- package/internals/index.d.ts +2 -0
- package/internals/index.js +20 -0
- package/internals/index.mjs +2 -0
- package/locales/arSD.js +5 -0
- package/locales/arSD.mjs +5 -0
- package/locales/beBY.js +5 -0
- package/locales/beBY.mjs +5 -0
- package/locales/bgBG.js +5 -0
- package/locales/bgBG.mjs +5 -0
- package/locales/bnBD.js +5 -0
- package/locales/bnBD.mjs +5 -0
- package/locales/caES.js +5 -0
- package/locales/caES.mjs +5 -0
- package/locales/csCZ.js +5 -0
- package/locales/csCZ.mjs +5 -0
- package/locales/daDK.js +5 -0
- package/locales/daDK.mjs +5 -0
- package/locales/deDE.js +5 -0
- package/locales/deDE.mjs +5 -0
- package/locales/elGR.js +5 -0
- package/locales/elGR.mjs +5 -0
- package/locales/esES.js +5 -0
- package/locales/esES.mjs +5 -0
- package/locales/faIR.js +5 -0
- package/locales/faIR.mjs +5 -0
- package/locales/fiFI.js +5 -0
- package/locales/fiFI.mjs +5 -0
- package/locales/frFR.js +5 -0
- package/locales/frFR.mjs +5 -0
- package/locales/heIL.js +5 -0
- package/locales/heIL.mjs +5 -0
- package/locales/hrHR.js +5 -0
- package/locales/hrHR.mjs +5 -0
- package/locales/huHU.js +5 -0
- package/locales/huHU.mjs +5 -0
- package/locales/hyAM.js +5 -0
- package/locales/hyAM.mjs +5 -0
- package/locales/idID.js +5 -0
- package/locales/idID.mjs +5 -0
- package/locales/isIS.js +5 -0
- package/locales/isIS.mjs +5 -0
- package/locales/itIT.js +5 -0
- package/locales/itIT.mjs +5 -0
- package/locales/jaJP.js +5 -0
- package/locales/jaJP.mjs +5 -0
- package/locales/koKR.js +5 -0
- package/locales/koKR.mjs +5 -0
- package/locales/nbNO.js +5 -0
- package/locales/nbNO.mjs +5 -0
- package/locales/nlNL.js +5 -0
- package/locales/nlNL.mjs +5 -0
- package/locales/nnNO.js +5 -0
- package/locales/nnNO.mjs +5 -0
- package/locales/plPL.js +5 -0
- package/locales/plPL.mjs +5 -0
- package/locales/ptBR.js +5 -0
- package/locales/ptBR.mjs +5 -0
- package/locales/ptPT.js +5 -0
- package/locales/ptPT.mjs +5 -0
- package/locales/roRO.js +5 -0
- package/locales/roRO.mjs +5 -0
- package/locales/ruRU.js +5 -0
- package/locales/ruRU.mjs +5 -0
- package/locales/skSK.js +5 -0
- package/locales/skSK.mjs +5 -0
- package/locales/svSE.js +5 -0
- package/locales/svSE.mjs +5 -0
- package/locales/thTH.js +5 -0
- package/locales/thTH.mjs +5 -0
- package/locales/trTR.js +5 -0
- package/locales/trTR.mjs +5 -0
- package/locales/ukUA.js +5 -0
- package/locales/ukUA.mjs +5 -0
- package/locales/urPK.js +5 -0
- package/locales/urPK.mjs +5 -0
- package/locales/viVN.js +5 -0
- package/locales/viVN.mjs +5 -0
- package/locales/zhCN.js +5 -0
- package/locales/zhCN.mjs +5 -0
- package/locales/zhHK.js +5 -0
- package/locales/zhHK.mjs +5 -0
- package/locales/zhTW.js +5 -0
- package/locales/zhTW.mjs +5 -0
- package/models/api/gridApiCommon.d.mts +2 -2
- package/models/api/gridApiCommon.d.ts +2 -2
- package/models/api/gridCallbackDetails.d.mts +11 -1
- package/models/api/gridCallbackDetails.d.ts +11 -1
- package/models/api/gridLocaleTextApi.d.mts +3 -0
- package/models/api/gridLocaleTextApi.d.ts +3 -0
- package/models/api/gridRowApi.d.mts +12 -0
- package/models/api/gridRowApi.d.ts +12 -0
- package/models/api/gridStateApi.d.mts +3 -2
- package/models/api/gridStateApi.d.ts +3 -2
- package/models/api/index.d.mts +1 -1
- package/models/api/index.d.ts +1 -1
- package/models/colDef/gridColDef.d.mts +5 -0
- package/models/colDef/gridColDef.d.ts +5 -0
- package/models/configuration/gridConfiguration.d.mts +13 -1
- package/models/configuration/gridConfiguration.d.ts +13 -1
- package/models/controlStateItem.d.mts +3 -2
- package/models/controlStateItem.d.ts +3 -2
- package/models/events/gridEventListener.d.mts +3 -2
- package/models/events/gridEventListener.d.ts +3 -2
- package/models/props/DataGridProps.d.mts +38 -35
- package/models/props/DataGridProps.d.ts +38 -35
- package/package.json +4 -4
- package/utils/domUtils.js +1 -1
- package/utils/domUtils.mjs +1 -1
- package/utils/getPublicApiRef.d.mts +2 -2
- package/utils/getPublicApiRef.d.ts +2 -2
- package/utils/getPublicApiRef.js +15 -3
- package/utils/getPublicApiRef.mjs +15 -3
- package/components/toolbarV8/ToolbarContext.d.mts +0 -11
- package/components/toolbarV8/ToolbarContext.d.ts +0 -11
- package/components/toolbarV8/ToolbarContext.js +0 -21
- package/components/toolbarV8/ToolbarContext.mjs +0 -13
- package/components/toolbarV8/utils.d.mts +0 -5
- package/components/toolbarV8/utils.d.ts +0 -5
- package/components/toolbarV8/utils.js +0 -23
- package/components/toolbarV8/utils.mjs +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,288 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 9.12.0
|
|
4
|
+
|
|
5
|
+
_Aug 21, 2026_
|
|
6
|
+
|
|
7
|
+
We'd like to extend a big thank you to the 12 contributors who made this release possible. Here are some highlights ✨:
|
|
8
|
+
|
|
9
|
+
- 🧮 Support [Formulas](https://mui.com/x/react-data-grid/formulas/) on the Data Grid: cells in opted-in columns can hold spreadsheet-like formulas (`=SUM(RANGE(…))`, `=price * quantity`) evaluated by a built-in engine, with a formula editor and [Formula Bar](https://mui.com/x/react-data-grid/components/formula-bar/), autocomplete, reference highlighting, optional A1 notation, fill-handle reference adjustment, custom functions, and live formula Excel export
|
|
10
|
+
- ♿️ Improve the accessibility of Data Grid cells and picker day cells
|
|
11
|
+
- 🗓️ Enable multi-resource event creation and editing in the Scheduler
|
|
12
|
+
- 🐞 Bugfixes
|
|
13
|
+
- 📚 Documentation improvements
|
|
14
|
+
|
|
15
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
16
|
+
@Anexus5919, @mustafajw07
|
|
17
|
+
|
|
18
|
+
The following team members contributed to this release:
|
|
19
|
+
@brijeshb42, @flaviendelangle, @JCQuintas, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes, @romgrk, @silviuaavram
|
|
20
|
+
|
|
21
|
+
### Data Grid
|
|
22
|
+
|
|
23
|
+
#### `@mui/x-data-grid@9.12.0`
|
|
24
|
+
|
|
25
|
+
- [DataGrid] Expose `apiRef` on `GridCallbackDetails` for selector access in callbacks (#22973) @michelengelen
|
|
26
|
+
- [DataGrid] Fix header height not updating when `headerFilters` or `columnGroupingModel` change (#23059) @MBilalShafi
|
|
27
|
+
- [DataGrid] Fix unhandled rejection when unmounting mid-autosize (#23319) @JCQuintas
|
|
28
|
+
- [DataGrid] Label the blank `singleSelect` filter option (#23294) @JCQuintas
|
|
29
|
+
- [DataGrid] Stop sending incomplete filter items to the data source (#23303) @JCQuintas
|
|
30
|
+
- [DataGrid] Support the `rowheader` attribute for grid cells (#23340) @silviuaavram
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid-pro@9.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
33
|
+
|
|
34
|
+
Same changes as in `@mui/x-data-grid@9.12.0`, plus:
|
|
35
|
+
|
|
36
|
+
- [DataGridPro] Honor `hasNextPage` in infinite lazy loading (#23048) @MBilalShafi
|
|
37
|
+
|
|
38
|
+
#### `@mui/x-data-grid-premium@9.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
39
|
+
|
|
40
|
+
Same changes as in `@mui/x-data-grid-pro@9.12.0`, plus:
|
|
41
|
+
|
|
42
|
+
- [DataGridPremium] Formula support (#22807) @MBilalShafi
|
|
43
|
+
|
|
44
|
+
### Date and Time Pickers
|
|
45
|
+
|
|
46
|
+
#### `@mui/x-date-pickers@9.12.0`
|
|
47
|
+
|
|
48
|
+
- [fields] Keep the selected section on blank space clicks (#23318) @LukasTy
|
|
49
|
+
- [pickers] Associate the day cells with their week day column header (#23339) @LukasTy
|
|
50
|
+
- [pickers] Keep the `gridcell` role and the column index on filler cells (#23326) @Anexus5919
|
|
51
|
+
|
|
52
|
+
#### `@mui/x-date-pickers-pro@9.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
53
|
+
|
|
54
|
+
Same changes as in `@mui/x-date-pickers@9.12.0`, plus:
|
|
55
|
+
|
|
56
|
+
- [DateRangeCalendar] Round the range highlight at the month grid edges (#23297) @JCQuintas
|
|
57
|
+
- [DateRangePicker] Keep the range highlight opaque for disabled days (#23317) @JCQuintas
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@9.12.0`
|
|
62
|
+
|
|
63
|
+
- [charts] Add a demo for label on grid row (#23333) @noraleonte
|
|
64
|
+
- [charts] Fix React 18 `propTypes` warnings and stray-pointer test flakiness (#23384) @LukasTy
|
|
65
|
+
- [charts] Focus the clicked item for keyboard navigation (#23247) @JCQuintas
|
|
66
|
+
|
|
67
|
+
#### `@mui/x-charts-pro@9.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
68
|
+
|
|
69
|
+
Same changes as in `@mui/x-charts@9.12.0`.
|
|
70
|
+
|
|
71
|
+
#### `@mui/x-charts-premium@9.12.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
72
|
+
|
|
73
|
+
Same changes as in `@mui/x-charts-pro@9.12.0`, plus:
|
|
74
|
+
|
|
75
|
+
- [charts-premium] Add `onItemClick` to the radial charts (#23253) @JCQuintas
|
|
76
|
+
|
|
77
|
+
### Tree View
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-tree-view@9.12.0`
|
|
80
|
+
|
|
81
|
+
Internal changes.
|
|
82
|
+
|
|
83
|
+
#### `@mui/x-tree-view-pro@9.12.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
84
|
+
|
|
85
|
+
Same changes as in `@mui/x-tree-view@9.12.0`.
|
|
86
|
+
|
|
87
|
+
### Scheduler
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-scheduler@9.0.0-beta.10`
|
|
90
|
+
|
|
91
|
+
- [scheduler] Add `onEventEditingStart` to let consumers open their own edit UI (#23361) @rita-codes
|
|
92
|
+
- [scheduler] Fix keyboard and focus issues around the "+N more" popover (#23312) @rita-codes
|
|
93
|
+
- [scheduler] Honor `viewConfig` hour limits in the compact day and week views (#23316) @rita-codes
|
|
94
|
+
- [scheduler] Share timeline event layout data (#23366) @flaviendelangle
|
|
95
|
+
- [scheduler] enable multi-resource event creation and editing (#23313) @mustafajw07
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.10` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.10`, plus:
|
|
100
|
+
|
|
101
|
+
- [scheduler-premium] Allow to control the min and max hour in the Event Timeline (#23212) @rita-codes
|
|
102
|
+
- [scheduler-premium] Dependencies - Create, select and delete via terminals (#23200) @rita-codes
|
|
103
|
+
|
|
104
|
+
### Codemod
|
|
105
|
+
|
|
106
|
+
#### `@mui/x-codemod@9.12.0`
|
|
107
|
+
|
|
108
|
+
Internal changes.
|
|
109
|
+
|
|
110
|
+
### Docs
|
|
111
|
+
|
|
112
|
+
- [docs][charts] Document line mark size customization (#23370) @JCQuintas
|
|
113
|
+
- [docs] Add recipe for constraining the `make-child` drop action by item type (#22940) @michelengelen
|
|
114
|
+
- [docs] Redirect the renamed Event Timeline views page (#23324) @brijeshb42
|
|
115
|
+
- [docs] Remove unused `adapter-dependencies.json` (#23328) @LukasTy
|
|
116
|
+
|
|
117
|
+
### Core
|
|
118
|
+
|
|
119
|
+
- [code-infra] Add release skill (#23308) @brijeshb42
|
|
120
|
+
- [code-infra] Fix changelog categorization of docs and `DateRangeCalendar` tags (#23385) @JCQuintas
|
|
121
|
+
- [code-infra] Sync mui-release skill (#23330) @brijeshb42
|
|
122
|
+
|
|
123
|
+
### Miscellaneous
|
|
124
|
+
|
|
125
|
+
- [core] Declare the missing `react-dom` peer dependencies (#23381) @LukasTy
|
|
126
|
+
- [test] Fix act warnings in the data source filter tests (#23360) @JCQuintas
|
|
127
|
+
- [virtualizer] Add inverse-sticky layout (#23053) @romgrk
|
|
128
|
+
|
|
129
|
+
## 9.11.1
|
|
130
|
+
|
|
131
|
+
_Aug 6, 2026_
|
|
132
|
+
|
|
133
|
+
We'd like to extend a big thank you to the 2 contributors who made this release possible. Here are some highlights ✨:
|
|
134
|
+
|
|
135
|
+
- 🐛 Fix the empty `@mui/x-charts-vendor` package published in v9.11.0
|
|
136
|
+
|
|
137
|
+
The following team members contributed to this release:
|
|
138
|
+
@JCQuintas, @rita-codes
|
|
139
|
+
|
|
140
|
+
### Charts
|
|
141
|
+
|
|
142
|
+
#### `@mui/x-charts@9.11.1`
|
|
143
|
+
|
|
144
|
+
- [charts] Fix empty `@mui/x-charts-vendor` published package (#23310) @JCQuintas
|
|
145
|
+
|
|
146
|
+
#### `@mui/x-charts-pro@9.11.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
147
|
+
|
|
148
|
+
Same changes as in `@mui/x-charts@9.11.1`.
|
|
149
|
+
|
|
150
|
+
#### `@mui/x-charts-premium@9.11.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
151
|
+
|
|
152
|
+
Same changes as in `@mui/x-charts-pro@9.11.1`.
|
|
153
|
+
|
|
154
|
+
#### `@mui/x-charts-vendor@9.11.1`
|
|
155
|
+
|
|
156
|
+
- [charts] Fix empty `@mui/x-charts-vendor` published package (#23310) @JCQuintas
|
|
157
|
+
|
|
158
|
+
### Scheduler
|
|
159
|
+
|
|
160
|
+
#### `@mui/x-scheduler@9.0.0-beta.9`
|
|
161
|
+
|
|
162
|
+
- [scheduler] Show the range validation errors on the End date and End time fields (#23291) @rita-codes
|
|
163
|
+
|
|
164
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.9` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
165
|
+
|
|
166
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.9`.
|
|
167
|
+
|
|
168
|
+
## 9.11.0
|
|
169
|
+
|
|
170
|
+
_Aug 6, 2026_
|
|
171
|
+
|
|
172
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
173
|
+
|
|
174
|
+
- ✨ Add `addItems()` and `getItemSelection()` API methods to Tree View
|
|
175
|
+
|
|
176
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
177
|
+
@12joan, @Anexus5919, @kevincorizi-sbt, @mixelburg, @mustafajw07, @strazto
|
|
178
|
+
|
|
179
|
+
The following team members contributed to this release:
|
|
180
|
+
@flaviendelangle, @hasdfa, @JCQuintas, @LukasTy, @MBilalShafi, @michelengelen, @noraleonte, @rita-codes
|
|
181
|
+
|
|
182
|
+
### Data Grid
|
|
183
|
+
|
|
184
|
+
#### `@mui/x-data-grid@9.11.0`
|
|
185
|
+
|
|
186
|
+
- [DataGrid] Fix `updateRows` stripping class prototypes from rows in datasource mode (#22288) @mixelburg
|
|
187
|
+
- [DataGrid] Do not re-fetch data when an `Activity` becomes visible (#22603) @12joan
|
|
188
|
+
- [DataGrid] Fix toolbar button stealing focus when a sibling's disabled state changes (#23204) @MBilalShafi
|
|
189
|
+
|
|
190
|
+
#### `@mui/x-data-grid-pro@9.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
191
|
+
|
|
192
|
+
Same changes as in `@mui/x-data-grid@9.11.0`.
|
|
193
|
+
|
|
194
|
+
#### `@mui/x-data-grid-premium@9.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
195
|
+
|
|
196
|
+
Same changes as in `@mui/x-data-grid-pro@9.11.0`.
|
|
197
|
+
|
|
198
|
+
### Date and Time Pickers
|
|
199
|
+
|
|
200
|
+
#### `@mui/x-date-pickers@9.11.0`
|
|
201
|
+
|
|
202
|
+
- [pickers] Fix day shift when editing dates predating timezone standardization (#23296) @JCQuintas
|
|
203
|
+
|
|
204
|
+
#### `@mui/x-date-pickers-pro@9.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
205
|
+
|
|
206
|
+
Same changes as in `@mui/x-date-pickers@9.11.0`, plus:
|
|
207
|
+
|
|
208
|
+
- [DateRangePicker] Fix disabled filler cells showing the range highlight (#23293) @JCQuintas
|
|
209
|
+
|
|
210
|
+
### Charts
|
|
211
|
+
|
|
212
|
+
#### `@mui/x-charts@9.11.0`
|
|
213
|
+
|
|
214
|
+
- [charts] Activate the focused item with `Enter`/`Space` (#23218) @JCQuintas
|
|
215
|
+
- [charts] Extract the axis click payload builders (#23215) @JCQuintas
|
|
216
|
+
- [charts] Fix `GestureManager` event listener leak on chart unmount (#23283) @kevincorizi-sbt
|
|
217
|
+
- [charts] Fix `slotProps.legend.position` and `direction` in `RadarChart` (#23254) @JCQuintas
|
|
218
|
+
- [charts] Fix axis clicks being discarded on slight pointer movement (#23244) @noraleonte
|
|
219
|
+
- [charts] Fix image export of charts sized by their parent element (#23255) @JCQuintas
|
|
220
|
+
- [charts] Forward `experimentalFeatures` on `RadarChart` and `Heatmap` (#23216) @JCQuintas
|
|
221
|
+
- [charts] Hide focus indicator when the chart loses focus (#23213) @JCQuintas
|
|
222
|
+
|
|
223
|
+
#### `@mui/x-charts-pro@9.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
224
|
+
|
|
225
|
+
Same changes as in `@mui/x-charts@9.11.0`.
|
|
226
|
+
|
|
227
|
+
#### `@mui/x-charts-premium@9.11.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
228
|
+
|
|
229
|
+
Same changes as in `@mui/x-charts-pro@9.11.0`, plus:
|
|
230
|
+
|
|
231
|
+
- [charts-premium] Fix `RangeBar` type override (#23217) @JCQuintas
|
|
232
|
+
|
|
233
|
+
### Tree View
|
|
234
|
+
|
|
235
|
+
#### `@mui/x-tree-view@9.11.0`
|
|
236
|
+
|
|
237
|
+
- [tree view] Add `addItems()` API method (#23159) @JCQuintas
|
|
238
|
+
- [tree view] Add `getItemSelection` API method (#23257) @noraleonte
|
|
239
|
+
- [tree view] Ignore `keepExistingSelection` when `multiSelect` is `false` (#23242) @JCQuintas
|
|
240
|
+
- [tree view] Prevent duplicate ids in multi-select arrow navigation (#23006) @Anexus5919
|
|
241
|
+
|
|
242
|
+
#### `@mui/x-tree-view-pro@9.11.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
243
|
+
|
|
244
|
+
Same changes as in `@mui/x-tree-view@9.11.0`, plus:
|
|
245
|
+
|
|
246
|
+
- [tree view] Discard superseded lazy-loading responses (#23005) @Anexus5919
|
|
247
|
+
|
|
248
|
+
### Scheduler
|
|
249
|
+
|
|
250
|
+
#### `@mui/x-scheduler@9.0.0-beta.8`
|
|
251
|
+
|
|
252
|
+
- [scheduler] Add `localeText` prop to standalone views (#23210) @rita-codes
|
|
253
|
+
- [scheduler] Finetune touch experience for time grid events and introduce editing drawer (#22624) @noraleonte
|
|
254
|
+
- [scheduler] Introduce the edit dialog form context & lifecycle contract (#23284) @rita-codes
|
|
255
|
+
- [scheduler] Refactor edit dialog General tab into section components (#23206) @rita-codes
|
|
256
|
+
- [scheduler] Replace copied Base UI internals with `@base-ui/react/internals` imports (#21972) @flaviendelangle
|
|
257
|
+
- [scheduler] Hide resource picker when no resources are provided (#23290) @mustafajw07
|
|
258
|
+
- [scheduler] Support multi-resource occurrences in `EventTimeline` (#23240) @mustafajw07
|
|
259
|
+
|
|
260
|
+
#### `@mui/x-scheduler-premium@9.0.0-beta.8` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
261
|
+
|
|
262
|
+
Same changes as in `@mui/x-scheduler@9.0.0-beta.8`.
|
|
263
|
+
|
|
264
|
+
### Codemod
|
|
265
|
+
|
|
266
|
+
#### `@mui/x-codemod@9.11.0`
|
|
267
|
+
|
|
268
|
+
- [codemod] Remove unused `@babel/core` and `@babel/traverse` dependencies (#23245) @LukasTy
|
|
269
|
+
|
|
270
|
+
### Docs
|
|
271
|
+
|
|
272
|
+
- [docs] Add recipe for adding new rows from clipboard copy (#22913) @michelengelen
|
|
273
|
+
- [docs] Clarify the package versions in v8 upgrade guides (#22376) @strazto
|
|
274
|
+
- [docs] Replace README peer dependency lists with an npm install command (#23256) @LukasTy
|
|
275
|
+
|
|
276
|
+
### Core
|
|
277
|
+
|
|
278
|
+
- [code-infra] Align action pin version comments (#23238) @LukasTy
|
|
279
|
+
|
|
280
|
+
### Miscellaneous
|
|
281
|
+
|
|
282
|
+
- [chat] Drop the undeclared `@mui/icons-material` dependency (#23252) @LukasTy
|
|
283
|
+
- [chat] Sanitize image part URLs and share the URL allow-list with markdown (#23058) @hasdfa
|
|
284
|
+
- [test] Type the `PickersTextField` test stub instead of `as any` (#23194) @LukasTy
|
|
285
|
+
|
|
3
286
|
## 9.10.1
|
|
4
287
|
|
|
5
288
|
_Jul 23, 2026_
|
package/DataGrid/DataGrid.js
CHANGED
|
@@ -33,7 +33,8 @@ const configuration = {
|
|
|
33
33
|
useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods,
|
|
34
34
|
useIsCellEditable: _useGridCellEditable.useIsCellEditable,
|
|
35
35
|
useCellAggregationResult: () => null,
|
|
36
|
-
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
36
|
+
useFilterValueGetter: apiRef => apiRef.current.getRowValue,
|
|
37
|
+
useColumnHeaderAdornment: () => null
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
@@ -166,6 +167,7 @@ process.env.NODE_ENV !== "production" ? DataGridRaw.propTypes /* remove-proptype
|
|
|
166
167
|
renderEditCell: _propTypes.default.func,
|
|
167
168
|
renderHeader: _propTypes.default.func,
|
|
168
169
|
resizable: _propTypes.default.bool,
|
|
170
|
+
rowHeader: _propTypes.default.bool,
|
|
169
171
|
rowSpanValueGetter: _propTypes.default.func,
|
|
170
172
|
sortable: _propTypes.default.bool,
|
|
171
173
|
sortComparator: _propTypes.default.func,
|
package/DataGrid/DataGrid.mjs
CHANGED
|
@@ -26,7 +26,8 @@ const configuration = {
|
|
|
26
26
|
useGridParamsOverridableMethods,
|
|
27
27
|
useIsCellEditable,
|
|
28
28
|
useCellAggregationResult: () => null,
|
|
29
|
-
useFilterValueGetter: apiRef => apiRef.current.getRowValue
|
|
29
|
+
useFilterValueGetter: apiRef => apiRef.current.getRowValue,
|
|
30
|
+
useColumnHeaderAdornment: () => null
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
33
|
const DataGridRaw = function DataGrid(inProps, ref) {
|
|
@@ -159,6 +160,7 @@ process.env.NODE_ENV !== "production" ? DataGridRaw.propTypes /* remove-proptype
|
|
|
159
160
|
renderEditCell: PropTypes.func,
|
|
160
161
|
renderHeader: PropTypes.func,
|
|
161
162
|
resizable: PropTypes.bool,
|
|
163
|
+
rowHeader: PropTypes.bool,
|
|
162
164
|
rowSpanValueGetter: PropTypes.func,
|
|
163
165
|
sortable: PropTypes.bool,
|
|
164
166
|
sortComparator: PropTypes.func,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DataGridProcessedProps, DataGridProps } from "../models/props/DataGridProps.mjs";
|
|
2
2
|
import type { GridValidRowModel } from "../models/index.mjs";
|
|
3
|
-
export declare const useDataGridProps: <R extends GridValidRowModel>(inProps: DataGridProps<R>) => DataGridProcessedProps<R>;
|
|
3
|
+
export declare const useDataGridProps: <R extends GridValidRowModel>(inProps: DataGridProps<R>) => DataGridProcessedProps<R, any>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { DataGridProcessedProps, DataGridProps } from "../models/props/DataGridProps.js";
|
|
2
2
|
import type { GridValidRowModel } from "../models/index.js";
|
|
3
|
-
export declare const useDataGridProps: <R extends GridValidRowModel>(inProps: DataGridProps<R>) => DataGridProcessedProps<R>;
|
|
3
|
+
export declare const useDataGridProps: <R extends GridValidRowModel>(inProps: DataGridProps<R>) => DataGridProcessedProps<R, any>;
|
package/README.md
CHANGED
|
@@ -8,17 +8,7 @@ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core li
|
|
|
8
8
|
Install the package in your project directory with:
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
|
-
npm install @mui/x-data-grid
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
This component has the following peer dependencies that you need to install as well.
|
|
15
|
-
|
|
16
|
-
```json
|
|
17
|
-
"peerDependencies": {
|
|
18
|
-
"@mui/material": "^5.15.14 || ^6.0.0 || ^7.0.0",
|
|
19
|
-
"react": "^17.0.0 || ^18.0.0 || ^19.0.0",
|
|
20
|
-
"react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
21
|
-
},
|
|
11
|
+
npm install @mui/x-data-grid @mui/material @emotion/react @emotion/styled
|
|
22
12
|
```
|
|
23
13
|
|
|
24
14
|
## Documentation
|
|
@@ -231,6 +231,19 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
231
231
|
}
|
|
232
232
|
const doc = (0, _ownerDocument.default)(apiRef.current.rootElementRef.current);
|
|
233
233
|
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
|
234
|
+
// An external editor can legitimately hold DOM focus for the focused cell
|
|
235
|
+
// (e.g. the Premium formula bar) — the same pipe the document click
|
|
236
|
+
// handler consults decides whether pulling focus back is allowed. The
|
|
237
|
+
// pseudo-event only carries the element that owns the focus.
|
|
238
|
+
const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors('canUpdateFocus', true, {
|
|
239
|
+
event: {
|
|
240
|
+
target: doc.activeElement
|
|
241
|
+
},
|
|
242
|
+
cell: null
|
|
243
|
+
});
|
|
244
|
+
if (!canUpdateFocus) {
|
|
245
|
+
return;
|
|
246
|
+
}
|
|
234
247
|
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
|
235
248
|
const elementToFocus = focusableElement || cellRef.current;
|
|
236
249
|
(0, _focusElement.focusElement)(elementToFocus, apiRef);
|
|
@@ -291,7 +304,7 @@ const GridCell = (0, _forwardRef.forwardRef)(function GridCell(props, ref) {
|
|
|
291
304
|
};
|
|
292
305
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", (0, _extends2.default)({
|
|
293
306
|
className: (0, _clsx.default)(classes.root, classNames, className),
|
|
294
|
-
role:
|
|
307
|
+
role: column.rowHeader ? 'rowheader' : 'gridcell',
|
|
295
308
|
"data-field": field,
|
|
296
309
|
"data-colindex": colIndex,
|
|
297
310
|
"aria-colindex": colIndex + 1,
|
|
@@ -224,6 +224,19 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
224
224
|
}
|
|
225
225
|
const doc = ownerDocument(apiRef.current.rootElementRef.current);
|
|
226
226
|
if (cellRef.current && !cellRef.current.contains(doc.activeElement)) {
|
|
227
|
+
// An external editor can legitimately hold DOM focus for the focused cell
|
|
228
|
+
// (e.g. the Premium formula bar) — the same pipe the document click
|
|
229
|
+
// handler consults decides whether pulling focus back is allowed. The
|
|
230
|
+
// pseudo-event only carries the element that owns the focus.
|
|
231
|
+
const canUpdateFocus = apiRef.current.unstable_applyPipeProcessors('canUpdateFocus', true, {
|
|
232
|
+
event: {
|
|
233
|
+
target: doc.activeElement
|
|
234
|
+
},
|
|
235
|
+
cell: null
|
|
236
|
+
});
|
|
237
|
+
if (!canUpdateFocus) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
227
240
|
const focusableElement = cellRef.current.querySelector('[tabindex="0"]');
|
|
228
241
|
const elementToFocus = focusableElement || cellRef.current;
|
|
229
242
|
focusElement(elementToFocus, apiRef);
|
|
@@ -284,7 +297,7 @@ const GridCell = forwardRef(function GridCell(props, ref) {
|
|
|
284
297
|
};
|
|
285
298
|
return /*#__PURE__*/_jsx("div", _extends({
|
|
286
299
|
className: clsx(classes.root, classNames, className),
|
|
287
|
-
role:
|
|
300
|
+
role: column.rowHeader ? 'rowheader' : 'gridcell',
|
|
288
301
|
"data-field": field,
|
|
289
302
|
"data-colindex": colIndex,
|
|
290
303
|
"aria-colindex": colIndex + 1,
|
|
@@ -18,6 +18,7 @@ var _fastMemo = require("@mui/x-internals/fastMemo");
|
|
|
18
18
|
var _RtlProvider = require("@mui/system/RtlProvider");
|
|
19
19
|
var _focusElement = require("../../utils/focusElement");
|
|
20
20
|
var _useGridPrivateApiContext = require("../../hooks/utils/useGridPrivateApiContext");
|
|
21
|
+
var _useGridConfiguration = require("../../hooks/utils/useGridConfiguration");
|
|
21
22
|
var _getColumnMenuItemKeys = require("../../hooks/features/columnMenu/getColumnMenuItemKeys");
|
|
22
23
|
var _ColumnHeaderMenuIcon = require("./ColumnHeaderMenuIcon");
|
|
23
24
|
var _GridColumnHeaderMenu = require("../menu/columnMenu/GridColumnHeaderMenu");
|
|
@@ -81,8 +82,10 @@ function GridColumnHeaderItem(props) {
|
|
|
81
82
|
pinnedOffset
|
|
82
83
|
} = props;
|
|
83
84
|
const apiRef = (0, _useGridPrivateApiContext.useGridPrivateApiContext)();
|
|
85
|
+
const configuration = (0, _useGridConfiguration.useGridConfiguration)();
|
|
84
86
|
const rootProps = (0, _useGridRootProps.useGridRootProps)();
|
|
85
87
|
const isRtl = (0, _RtlProvider.useRtl)();
|
|
88
|
+
const adornment = configuration.hooks.useColumnHeaderAdornment(colDef.field);
|
|
86
89
|
const headerCellRef = React.useRef(null);
|
|
87
90
|
const columnMenuId = (0, _useId.default)();
|
|
88
91
|
const columnMenuButtonId = (0, _useId.default)();
|
|
@@ -232,6 +235,7 @@ function GridColumnHeaderItem(props) {
|
|
|
232
235
|
separatorSide: separatorSide,
|
|
233
236
|
isDraggable: isDraggable,
|
|
234
237
|
headerComponent: headerComponent,
|
|
238
|
+
adornment: adornment,
|
|
235
239
|
description: colDef.description,
|
|
236
240
|
elementId: colDef.field,
|
|
237
241
|
width: colDef.computedWidth,
|
|
@@ -11,6 +11,7 @@ import { fastMemo } from '@mui/x-internals/fastMemo';
|
|
|
11
11
|
import { useRtl } from '@mui/system/RtlProvider';
|
|
12
12
|
import { focusElement } from "../../utils/focusElement.mjs";
|
|
13
13
|
import { useGridPrivateApiContext } from "../../hooks/utils/useGridPrivateApiContext.mjs";
|
|
14
|
+
import { useGridConfiguration } from "../../hooks/utils/useGridConfiguration.mjs";
|
|
14
15
|
import { getColumnMenuItemKeys } from "../../hooks/features/columnMenu/getColumnMenuItemKeys.mjs";
|
|
15
16
|
import { ColumnHeaderMenuIcon } from "./ColumnHeaderMenuIcon.mjs";
|
|
16
17
|
import { GridColumnHeaderMenu } from "../menu/columnMenu/GridColumnHeaderMenu.mjs";
|
|
@@ -74,8 +75,10 @@ function GridColumnHeaderItem(props) {
|
|
|
74
75
|
pinnedOffset
|
|
75
76
|
} = props;
|
|
76
77
|
const apiRef = useGridPrivateApiContext();
|
|
78
|
+
const configuration = useGridConfiguration();
|
|
77
79
|
const rootProps = useGridRootProps();
|
|
78
80
|
const isRtl = useRtl();
|
|
81
|
+
const adornment = configuration.hooks.useColumnHeaderAdornment(colDef.field);
|
|
79
82
|
const headerCellRef = React.useRef(null);
|
|
80
83
|
const columnMenuId = useId();
|
|
81
84
|
const columnMenuButtonId = useId();
|
|
@@ -225,6 +228,7 @@ function GridColumnHeaderItem(props) {
|
|
|
225
228
|
separatorSide: separatorSide,
|
|
226
229
|
isDraggable: isDraggable,
|
|
227
230
|
headerComponent: headerComponent,
|
|
231
|
+
adornment: adornment,
|
|
228
232
|
description: colDef.description,
|
|
229
233
|
elementId: colDef.field,
|
|
230
234
|
width: colDef.computedWidth,
|
|
@@ -23,6 +23,13 @@ interface GridGenericColumnHeaderItemProps extends Pick<GridStateColDef, 'header
|
|
|
23
23
|
columnMenuIconButton?: React.ReactNode;
|
|
24
24
|
columnMenu?: React.ReactNode;
|
|
25
25
|
columnTitleIconButtons?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Optional adornment rendered at the start of the title content, before the
|
|
28
|
+
* title label (used by the Premium formula feature for A1 column letters).
|
|
29
|
+
* Placing it inside the (non-reversed) title content keeps it on the same
|
|
30
|
+
* side of the title for both left- and right-aligned headers.
|
|
31
|
+
*/
|
|
32
|
+
adornment?: React.ReactNode;
|
|
26
33
|
label: string;
|
|
27
34
|
draggableContainerProps?: Partial<React.HTMLProps<HTMLDivElement>>;
|
|
28
35
|
columnHeaderSeparatorProps?: Partial<GridColumnHeaderSeparatorProps>;
|
|
@@ -23,6 +23,13 @@ interface GridGenericColumnHeaderItemProps extends Pick<GridStateColDef, 'header
|
|
|
23
23
|
columnMenuIconButton?: React.ReactNode;
|
|
24
24
|
columnMenu?: React.ReactNode;
|
|
25
25
|
columnTitleIconButtons?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* Optional adornment rendered at the start of the title content, before the
|
|
28
|
+
* title label (used by the Premium formula feature for A1 column letters).
|
|
29
|
+
* Placing it inside the (non-reversed) title content keeps it on the same
|
|
30
|
+
* side of the title for both left- and right-aligned headers.
|
|
31
|
+
*/
|
|
32
|
+
adornment?: React.ReactNode;
|
|
26
33
|
label: string;
|
|
27
34
|
draggableContainerProps?: Partial<React.HTMLProps<HTMLDivElement>>;
|
|
28
35
|
columnHeaderSeparatorProps?: Partial<GridColumnHeaderSeparatorProps>;
|
|
@@ -17,7 +17,7 @@ var _GridColumnHeaderTitle = require("./GridColumnHeaderTitle");
|
|
|
17
17
|
var _GridColumnHeaderSeparator = require("./GridColumnHeaderSeparator");
|
|
18
18
|
var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
|
|
19
19
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
|
-
const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizing", "sortDirection", "hasFocus", "tabIndex", "separatorSide", "isDraggable", "headerComponent", "description", "elementId", "width", "columnMenuIconButton", "columnMenu", "columnTitleIconButtons", "headerClassName", "label", "resizable", "draggableContainerProps", "columnHeaderSeparatorProps", "style"];
|
|
20
|
+
const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizing", "sortDirection", "hasFocus", "tabIndex", "separatorSide", "isDraggable", "headerComponent", "description", "elementId", "width", "columnMenuIconButton", "columnMenu", "columnTitleIconButtons", "adornment", "headerClassName", "label", "resizable", "draggableContainerProps", "columnHeaderSeparatorProps", "style"];
|
|
21
21
|
const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _forwardRef.forwardRef)(function GridGenericColumnHeaderItem(props, ref) {
|
|
22
22
|
const {
|
|
23
23
|
classes,
|
|
@@ -34,6 +34,7 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _f
|
|
|
34
34
|
columnMenuIconButton = null,
|
|
35
35
|
columnMenu = null,
|
|
36
36
|
columnTitleIconButtons = null,
|
|
37
|
+
adornment = null,
|
|
37
38
|
headerClassName,
|
|
38
39
|
label,
|
|
39
40
|
resizable,
|
|
@@ -68,13 +69,13 @@ const GridGenericColumnHeaderItem = exports.GridGenericColumnHeaderItem = (0, _f
|
|
|
68
69
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
69
70
|
className: classes.titleContainer,
|
|
70
71
|
role: "none",
|
|
71
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
72
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
72
73
|
className: classes.titleContainerContent,
|
|
73
|
-
children: headerComponent !== undefined ? headerComponent : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderTitle.GridColumnHeaderTitle, {
|
|
74
|
+
children: [adornment, headerComponent !== undefined ? headerComponent : /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderTitle.GridColumnHeaderTitle, {
|
|
74
75
|
label: label,
|
|
75
76
|
description: description,
|
|
76
77
|
columnWidth: width
|
|
77
|
-
})
|
|
78
|
+
})]
|
|
78
79
|
}), columnTitleIconButtons]
|
|
79
80
|
}), columnMenuIconButton]
|
|
80
81
|
})), /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridColumnHeaderSeparator.GridColumnHeaderSeparator, (0, _extends2.default)({
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
4
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
5
|
-
const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizing", "sortDirection", "hasFocus", "tabIndex", "separatorSide", "isDraggable", "headerComponent", "description", "elementId", "width", "columnMenuIconButton", "columnMenu", "columnTitleIconButtons", "headerClassName", "label", "resizable", "draggableContainerProps", "columnHeaderSeparatorProps", "style"];
|
|
5
|
+
const _excluded = ["classes", "columnMenuOpen", "colIndex", "height", "isResizing", "sortDirection", "hasFocus", "tabIndex", "separatorSide", "isDraggable", "headerComponent", "description", "elementId", "width", "columnMenuIconButton", "columnMenu", "columnTitleIconButtons", "adornment", "headerClassName", "label", "resizable", "draggableContainerProps", "columnHeaderSeparatorProps", "style"];
|
|
6
6
|
import * as React from 'react';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import useForkRef from '@mui/utils/useForkRef';
|
|
@@ -27,6 +27,7 @@ const GridGenericColumnHeaderItem = forwardRef(function GridGenericColumnHeaderI
|
|
|
27
27
|
columnMenuIconButton = null,
|
|
28
28
|
columnMenu = null,
|
|
29
29
|
columnTitleIconButtons = null,
|
|
30
|
+
adornment = null,
|
|
30
31
|
headerClassName,
|
|
31
32
|
label,
|
|
32
33
|
resizable,
|
|
@@ -61,13 +62,13 @@ const GridGenericColumnHeaderItem = forwardRef(function GridGenericColumnHeaderI
|
|
|
61
62
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
62
63
|
className: classes.titleContainer,
|
|
63
64
|
role: "none",
|
|
64
|
-
children: [/*#__PURE__*/
|
|
65
|
+
children: [/*#__PURE__*/_jsxs("div", {
|
|
65
66
|
className: classes.titleContainerContent,
|
|
66
|
-
children: headerComponent !== undefined ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
|
|
67
|
+
children: [adornment, headerComponent !== undefined ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
|
|
67
68
|
label: label,
|
|
68
69
|
description: description,
|
|
69
70
|
columnWidth: width
|
|
70
|
-
})
|
|
71
|
+
})]
|
|
71
72
|
}), columnTitleIconButtons]
|
|
72
73
|
}), columnMenuIconButton]
|
|
73
74
|
})), /*#__PURE__*/_jsx(GridColumnHeaderSeparator, _extends({
|
|
@@ -23,12 +23,23 @@ const renderSingleSelectOptions = ({
|
|
|
23
23
|
getOptionLabel,
|
|
24
24
|
getOptionValue,
|
|
25
25
|
isSelectNative,
|
|
26
|
-
baseSelectOptionProps
|
|
26
|
+
baseSelectOptionProps,
|
|
27
|
+
blankOptionLabel
|
|
27
28
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const valueOptions = (0, _filterPanelUtils.getValueOptions)(column) || [];
|
|
30
|
+
|
|
31
|
+
// A column that declares its own blank entry already offers a way to reset the filter.
|
|
32
|
+
// Prepending another one would render two options sharing the same `''` key.
|
|
33
|
+
const declaresBlankOption = valueOptions.some(option => {
|
|
34
|
+
const optionValue = getOptionValue(option);
|
|
35
|
+
return optionValue === '' || optionValue === null || optionValue === undefined;
|
|
36
|
+
});
|
|
37
|
+
const iterableColumnValues = declaresBlankOption ? valueOptions : ['', ...valueOptions];
|
|
38
|
+
return iterableColumnValues.map((option, index) => {
|
|
39
|
+
// The prepended entry is ours, not a value option, so it skips the column accessors.
|
|
40
|
+
const isBlankOption = !declaresBlankOption && index === 0;
|
|
41
|
+
const value = isBlankOption ? '' : getOptionValue(option);
|
|
42
|
+
let label = isBlankOption ? blankOptionLabel : getOptionLabel(option);
|
|
32
43
|
if (label === '') {
|
|
33
44
|
label = ' '; // To force the height of the empty option
|
|
34
45
|
}
|
|
@@ -98,7 +109,8 @@ function GridFilterInputSingleSelect(props) {
|
|
|
98
109
|
getOptionLabel,
|
|
99
110
|
getOptionValue,
|
|
100
111
|
isSelectNative,
|
|
101
|
-
baseSelectOptionProps: rootProps.slotProps?.baseSelectOption
|
|
112
|
+
baseSelectOptionProps: rootProps.slotProps?.baseSelectOption,
|
|
113
|
+
blankOptionLabel: apiRef.current.getLocaleText('filterValueAny')
|
|
102
114
|
})
|
|
103
115
|
})), headerFilterMenu, clearButton]
|
|
104
116
|
});
|