@mui/x-data-grid 5.17.5 → 6.0.0-alpha.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.
Files changed (215) hide show
  1. package/CHANGELOG.md +297 -19
  2. package/DataGrid/DataGrid.js +1 -11
  3. package/DataGrid/useDataGridProps.js +4 -4
  4. package/colDef/gridStringColDef.js +0 -1
  5. package/components/DataGridVirtualScroller.js +5 -3
  6. package/components/GridRow.js +4 -3
  7. package/components/base/GridBody.js +1 -2
  8. package/components/base/GridOverlays.js +52 -12
  9. package/components/cell/GridActionsCell.js +1 -1
  10. package/components/cell/GridBooleanCell.js +3 -2
  11. package/components/cell/GridEditBooleanCell.js +1 -1
  12. package/components/cell/GridEditDateCell.js +1 -1
  13. package/components/cell/GridEditInputCell.js +1 -1
  14. package/components/cell/GridEditSingleSelectCell.js +1 -1
  15. package/components/columnSelection/GridCellCheckboxRenderer.d.ts +2 -2
  16. package/components/columnSelection/GridCellCheckboxRenderer.js +2 -7
  17. package/components/containers/GridOverlay.js +0 -5
  18. package/components/containers/GridRootStyles.js +2 -0
  19. package/components/panel/GridColumnsPanel.js +4 -18
  20. package/constants/gridClasses.d.ts +8 -0
  21. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +1 -1
  22. package/hooks/core/strategyProcessing/gridStrategyProcessingApi.d.ts +1 -1
  23. package/hooks/features/columns/gridColumnsInterfaces.d.ts +1 -4
  24. package/hooks/features/columns/gridColumnsUtils.d.ts +3 -4
  25. package/hooks/features/columns/gridColumnsUtils.js +21 -92
  26. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  27. package/hooks/features/columns/useGridColumns.js +28 -61
  28. package/hooks/features/editRows/useGridCellEditing.new.js +2 -2
  29. package/hooks/features/editRows/useGridEditing.new.js +3 -2
  30. package/hooks/features/editRows/useGridEditing.old.js +2 -1
  31. package/hooks/features/editRows/useGridRowEditing.new.js +2 -2
  32. package/hooks/features/export/useGridPrintExport.js +31 -17
  33. package/hooks/features/export/utils.js +1 -5
  34. package/hooks/features/filter/gridFilterSelector.js +2 -2
  35. package/hooks/features/filter/useGridFilter.js +6 -6
  36. package/hooks/features/pagination/gridPaginationSelector.js +2 -2
  37. package/hooks/features/rows/gridRowsInterfaces.d.ts +106 -0
  38. package/hooks/features/rows/{gridRowsState.js → gridRowsInterfaces.js} +0 -0
  39. package/hooks/features/rows/gridRowsSelector.d.ts +17 -7
  40. package/hooks/features/rows/gridRowsSelector.js +38 -6
  41. package/hooks/features/rows/gridRowsUtils.d.ts +16 -4
  42. package/hooks/features/rows/gridRowsUtils.js +222 -39
  43. package/hooks/features/rows/index.d.ts +3 -3
  44. package/hooks/features/rows/index.js +2 -2
  45. package/hooks/features/rows/useGridRows.js +161 -124
  46. package/hooks/features/rows/useGridRowsPreProcessors.js +78 -26
  47. package/hooks/features/selection/useGridSelection.js +3 -3
  48. package/hooks/features/sorting/gridSortingSelector.js +9 -4
  49. package/hooks/features/sorting/gridSortingState.d.ts +2 -2
  50. package/hooks/features/sorting/useGridSorting.js +9 -33
  51. package/hooks/features/virtualization/useGridVirtualScroller.js +4 -10
  52. package/hooks/utils/useGridApiEventHandler.d.ts +2 -2
  53. package/index.js +1 -1
  54. package/internals/index.d.ts +2 -1
  55. package/internals/index.js +1 -0
  56. package/legacy/DataGrid/DataGrid.js +1 -11
  57. package/legacy/DataGrid/useDataGridProps.js +4 -4
  58. package/legacy/colDef/gridStringColDef.js +0 -1
  59. package/legacy/components/DataGridVirtualScroller.js +5 -3
  60. package/legacy/components/GridRow.js +4 -3
  61. package/legacy/components/base/GridBody.js +1 -2
  62. package/legacy/components/base/GridOverlays.js +54 -12
  63. package/legacy/components/cell/GridActionsCell.js +1 -1
  64. package/legacy/components/cell/GridBooleanCell.js +3 -2
  65. package/legacy/components/cell/GridEditBooleanCell.js +1 -1
  66. package/legacy/components/cell/GridEditDateCell.js +1 -1
  67. package/legacy/components/cell/GridEditInputCell.js +1 -1
  68. package/legacy/components/cell/GridEditSingleSelectCell.js +1 -1
  69. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +2 -7
  70. package/legacy/components/containers/GridOverlay.js +0 -5
  71. package/legacy/components/containers/GridRootStyles.js +2 -1
  72. package/legacy/components/panel/GridColumnsPanel.js +9 -23
  73. package/legacy/hooks/features/columns/gridColumnsUtils.js +22 -94
  74. package/legacy/hooks/features/columns/useGridColumns.js +27 -60
  75. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +2 -2
  76. package/legacy/hooks/features/editRows/useGridEditing.new.js +3 -2
  77. package/legacy/hooks/features/editRows/useGridEditing.old.js +2 -1
  78. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +2 -2
  79. package/legacy/hooks/features/export/useGridPrintExport.js +33 -20
  80. package/legacy/hooks/features/export/utils.js +1 -3
  81. package/legacy/hooks/features/filter/gridFilterSelector.js +2 -2
  82. package/legacy/hooks/features/filter/useGridFilter.js +6 -6
  83. package/legacy/hooks/features/pagination/gridPaginationSelector.js +2 -2
  84. package/legacy/hooks/features/rows/{gridRowsState.js → gridRowsInterfaces.js} +0 -0
  85. package/legacy/hooks/features/rows/gridRowsSelector.js +52 -9
  86. package/legacy/hooks/features/rows/gridRowsUtils.js +238 -46
  87. package/legacy/hooks/features/rows/index.js +2 -2
  88. package/legacy/hooks/features/rows/useGridRows.js +163 -134
  89. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +81 -26
  90. package/legacy/hooks/features/selection/useGridSelection.js +3 -3
  91. package/legacy/hooks/features/sorting/gridSortingSelector.js +5 -2
  92. package/legacy/hooks/features/sorting/useGridSorting.js +11 -33
  93. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +4 -10
  94. package/legacy/index.js +1 -1
  95. package/legacy/internals/index.js +1 -0
  96. package/legacy/models/events/index.js +1 -2
  97. package/legacy/models/gridFeatureMode.js +1 -4
  98. package/legacy/models/params/index.js +0 -1
  99. package/models/api/gridCoreApi.d.ts +2 -2
  100. package/models/api/gridParamsApi.d.ts +2 -2
  101. package/models/api/gridRowApi.d.ts +7 -5
  102. package/models/colDef/gridColDef.d.ts +0 -12
  103. package/models/events/gridEventListener.d.ts +2 -3
  104. package/models/events/gridEventLookup.d.ts +5 -13
  105. package/models/events/gridEventPublisher.d.ts +9 -10
  106. package/models/events/index.d.ts +0 -1
  107. package/models/events/index.js +1 -2
  108. package/models/gridApiCaches.d.ts +1 -3
  109. package/models/gridFeatureMode.d.ts +0 -4
  110. package/models/gridFeatureMode.js +1 -4
  111. package/models/gridRows.d.ts +100 -30
  112. package/models/gridSortModel.d.ts +2 -2
  113. package/models/params/gridCellParams.d.ts +7 -11
  114. package/models/params/gridEditCellParams.d.ts +2 -2
  115. package/models/params/index.d.ts +0 -1
  116. package/models/params/index.js +0 -1
  117. package/models/props/DataGridProps.d.ts +0 -9
  118. package/modern/DataGrid/DataGrid.js +1 -11
  119. package/modern/DataGrid/useDataGridProps.js +4 -4
  120. package/modern/colDef/gridStringColDef.js +0 -1
  121. package/modern/components/DataGridVirtualScroller.js +5 -3
  122. package/modern/components/GridRow.js +4 -3
  123. package/modern/components/base/GridBody.js +1 -2
  124. package/modern/components/base/GridOverlays.js +52 -12
  125. package/modern/components/cell/GridActionsCell.js +1 -1
  126. package/modern/components/cell/GridBooleanCell.js +3 -2
  127. package/modern/components/cell/GridEditBooleanCell.js +1 -1
  128. package/modern/components/cell/GridEditDateCell.js +1 -1
  129. package/modern/components/cell/GridEditInputCell.js +1 -1
  130. package/modern/components/cell/GridEditSingleSelectCell.js +1 -1
  131. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +2 -7
  132. package/modern/components/containers/GridOverlay.js +0 -5
  133. package/modern/components/containers/GridRootStyles.js +2 -0
  134. package/modern/components/panel/GridColumnsPanel.js +4 -18
  135. package/modern/hooks/features/columns/gridColumnsUtils.js +21 -92
  136. package/modern/hooks/features/columns/useGridColumns.js +21 -54
  137. package/modern/hooks/features/editRows/useGridCellEditing.new.js +2 -2
  138. package/modern/hooks/features/editRows/useGridEditing.new.js +3 -2
  139. package/modern/hooks/features/editRows/useGridEditing.old.js +2 -1
  140. package/modern/hooks/features/editRows/useGridRowEditing.new.js +2 -2
  141. package/modern/hooks/features/export/useGridPrintExport.js +30 -16
  142. package/modern/hooks/features/export/utils.js +1 -1
  143. package/modern/hooks/features/filter/gridFilterSelector.js +2 -2
  144. package/modern/hooks/features/filter/useGridFilter.js +6 -6
  145. package/modern/hooks/features/pagination/gridPaginationSelector.js +2 -2
  146. package/{legacy/models/params/gridColumnVisibilityChangeParams.js → modern/hooks/features/rows/gridRowsInterfaces.js} +0 -0
  147. package/modern/hooks/features/rows/gridRowsSelector.js +28 -6
  148. package/modern/hooks/features/rows/gridRowsUtils.js +220 -37
  149. package/modern/hooks/features/rows/index.js +2 -2
  150. package/modern/hooks/features/rows/useGridRows.js +158 -121
  151. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +78 -26
  152. package/modern/hooks/features/selection/useGridSelection.js +3 -3
  153. package/modern/hooks/features/sorting/gridSortingSelector.js +3 -2
  154. package/modern/hooks/features/sorting/useGridSorting.js +9 -33
  155. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +4 -10
  156. package/modern/index.js +1 -1
  157. package/modern/internals/index.js +1 -0
  158. package/modern/models/events/index.js +1 -2
  159. package/modern/models/gridFeatureMode.js +1 -4
  160. package/modern/models/params/index.js +0 -1
  161. package/node/DataGrid/DataGrid.js +1 -11
  162. package/node/DataGrid/useDataGridProps.js +3 -3
  163. package/node/colDef/gridStringColDef.js +0 -1
  164. package/node/components/DataGridVirtualScroller.js +5 -3
  165. package/node/components/GridRow.js +3 -2
  166. package/node/components/base/GridBody.js +1 -3
  167. package/node/components/base/GridOverlays.js +57 -12
  168. package/node/components/cell/GridActionsCell.js +1 -1
  169. package/node/components/cell/GridBooleanCell.js +4 -2
  170. package/node/components/cell/GridEditBooleanCell.js +1 -1
  171. package/node/components/cell/GridEditDateCell.js +1 -1
  172. package/node/components/cell/GridEditInputCell.js +1 -1
  173. package/node/components/cell/GridEditSingleSelectCell.js +1 -1
  174. package/node/components/columnSelection/GridCellCheckboxRenderer.js +2 -7
  175. package/node/components/containers/GridOverlay.js +0 -5
  176. package/node/components/containers/GridRootStyles.js +2 -0
  177. package/node/components/panel/GridColumnsPanel.js +4 -18
  178. package/node/hooks/features/columns/gridColumnsUtils.js +20 -88
  179. package/node/hooks/features/columns/useGridColumns.js +29 -60
  180. package/node/hooks/features/editRows/useGridCellEditing.new.js +1 -1
  181. package/node/hooks/features/editRows/useGridEditing.new.js +4 -2
  182. package/node/hooks/features/editRows/useGridEditing.old.js +3 -1
  183. package/node/hooks/features/editRows/useGridRowEditing.new.js +1 -1
  184. package/node/hooks/features/export/useGridPrintExport.js +31 -17
  185. package/node/hooks/features/export/utils.js +1 -5
  186. package/node/hooks/features/filter/gridFilterSelector.js +1 -1
  187. package/node/hooks/features/filter/useGridFilter.js +5 -6
  188. package/node/hooks/features/pagination/gridPaginationSelector.js +1 -1
  189. package/node/hooks/features/rows/{gridRowsState.js → gridRowsInterfaces.js} +0 -0
  190. package/node/hooks/features/rows/gridRowsSelector.js +43 -10
  191. package/node/hooks/features/rows/gridRowsUtils.js +239 -40
  192. package/node/hooks/features/rows/index.js +23 -9
  193. package/node/hooks/features/rows/useGridRows.js +161 -122
  194. package/node/hooks/features/rows/useGridRowsPreProcessors.js +81 -26
  195. package/node/hooks/features/selection/useGridSelection.js +3 -3
  196. package/node/hooks/features/sorting/gridSortingSelector.js +9 -4
  197. package/node/hooks/features/sorting/useGridSorting.js +9 -33
  198. package/node/hooks/features/virtualization/useGridVirtualScroller.js +4 -10
  199. package/node/index.js +1 -1
  200. package/node/internals/index.js +14 -2
  201. package/node/models/events/index.js +0 -13
  202. package/node/models/gridFeatureMode.js +1 -7
  203. package/node/models/params/index.js +0 -13
  204. package/package.json +3 -3
  205. package/hooks/features/rows/gridRowsState.d.ts +0 -60
  206. package/legacy/models/events/gridEvents.js +0 -92
  207. package/models/events/gridEvents.d.ts +0 -91
  208. package/models/events/gridEvents.js +0 -92
  209. package/models/params/gridColumnVisibilityChangeParams.d.ts +0 -18
  210. package/models/params/gridColumnVisibilityChangeParams.js +0 -1
  211. package/modern/hooks/features/rows/gridRowsState.js +0 -1
  212. package/modern/models/events/gridEvents.js +0 -92
  213. package/modern/models/params/gridColumnVisibilityChangeParams.js +0 -1
  214. package/node/models/events/gridEvents.js +0 -97
  215. package/node/models/params/gridColumnVisibilityChangeParams.js +0 -5
package/CHANGELOG.md CHANGED
@@ -3,37 +3,315 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## 5.17.5
6
+ ## 6.0.0-alpha.1
7
7
 
8
8
  _Sep 29, 2022_
9
9
 
10
- We'd like to offer a big thanks to the 2 contributors who made this release possible. Here are some highlights ✨:
10
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
11
11
 
12
- - 🎁 Add theme augmentation module to DataGridPremium (#6316) @cherniavskii
13
- - 👀 Fix blank space when changing page with dynamic row height (#6320) @m4theushw
14
- - 📚 Improve controlled editing demo to make easier to reuse it (#6306) @cherniavskii
12
+ - 🚀 Better support for custom overlays (#5808) @cherniavskii
13
+ - 🖨️ Improve print export (#6273) @oliviertassinari
14
+ - 🎁 Reduce confusion when initializing pickers with a date value (#6170) @flaviendelangle
15
+ - 📚 Documentation improvements
15
16
  - 🐞 Bugfixes
16
17
 
17
- ### `@mui/x-data-grid@v5.17.5` / `@mui/x-data-grid-pro@v5.17.5` / `@mui/x-data-grid-premium@v5.17.5`
18
+ ### `@mui/x-data-grid@v6.0.0-alpha.1` / `@mui/x-data-grid-pro@v6.0.0-alpha.1` / `@mui/x-data-grid-premium@v6.0.0-alpha.1`
19
+
20
+ #### Breaking changes
21
+
22
+ - New internal rows structure for v6 (#4927) @flaviendelangle
23
+
24
+ Some selectors related to the rows have been renamed to better describe the type of rows they are returning:
25
+
26
+ ```diff
27
+ -const result = gridRowsIdToIdLookupSelector(apiRef);
28
+ +const result = gridRowsDataRowIdToIdLookupSelector(apiRef);
29
+ ```
30
+
31
+ ```diff
32
+ -const result = gridRowTreeDepthSelector(apiRef);
33
+ +const result = gridRowMaximumTreeDepthSelector(apiRef);
34
+ ```
35
+
36
+ The format of the tree nodes (the element accessible in `params.node` or with the `apiRef.current.getRowNode` method) have changed.
37
+ You have a new `type` property, which can be useful, for example, to apply custom behavior on groups.
38
+ Here is an example of the old and new approach showing how to apply a custom value formatter in groups for the grouping column:
39
+
40
+ ```diff
41
+ <DataGridPremium
42
+ groupingColDef={() => ({
43
+ valueFormatter: (params) => {
44
+ if (params.id == null) {
45
+ return params.value;
46
+ }
47
+
48
+ const rowNode = apiRef.current.getRowNode(params.id!)!;
49
+ - if (rowNode.children?.length) {
50
+ + if (rowNode.type === 'group') {
51
+ return `by ${rowNode.groupingKey ?? ''}`;
52
+ }
53
+
54
+ return params.value;
55
+ }
56
+ })}
57
+ />
58
+ ```
59
+
60
+ - The `GridFeatureModeConstant` constant no longer exists (#6077) @DanailH
61
+
62
+ ```diff
63
+ -import { GridFeatureModeConstant } from '@mui/x-data-grid';
64
+ ```
65
+
66
+ #### Changes
67
+
68
+ - [DataGrid] Fix `GridPagination` props typing (#6238) @cherniavskii
69
+ - [DataGrid] Fix `GridRow` not forwarding `ref` to the root element (#6274) @cherniavskii
70
+ - [DataGrid] Fix `undefined` value being showed in filter button tooltip text (#6259) @cherniavskii
71
+ - [DataGrid] Fix blank space when changing page with dynamic row height (#6049) @m4theushw
72
+ - [DataGrid] New internal rows structure for v6 (#4927) @flaviendelangle
73
+ - [DataGrid] Revert cell/row mode if `processRowUpdate` fails (#6185) @m4theushw
74
+ - [DataGrid] Rework overlays layout (#5808) @cherniavskii
75
+ - [DataGrid] Improve print support (#6273) @oliviertassinari
76
+ - [DataGridPremium] Add missing `themeAugmentation` module (#6270) @cherniavskii
77
+
78
+ ### `@mui/x-date-pickers@v6.0.0-alpha.1` / `@mui/x-date-pickers-pro@v6.0.0-alpha.1`
79
+
80
+ #### Breaking changes
81
+
82
+ - [pickers] Do not support unparsed date formats anymore (#6170) @flaviendelangle
83
+
84
+ The `value` prop of the pickers now expects a parsed value.
85
+ Until now, it was possible to provide any format that your date management library was able to parse.
86
+ For instance, you could pass `value={new Date()}` when using `AdapterDayjs`.
87
+
88
+ This brought a lot of confusion so we decided to remove this behavior.
89
+ The format expected by the `value` prop is now the same as for any other prop holding a date.
90
+ Here is the syntax to initialize a date picker at the current date for each adapter:
91
+
92
+ ```tsx
93
+ // Date-fns
94
+ <DatePicker value={new Date()} />
95
+
96
+ // Dayjs
97
+ import dayjs from 'dayjs'
98
+ <DatePicker value={dayjs()} />
99
+
100
+ // Moment
101
+ import moment from 'moment'
102
+ <DatePicker value={moment()} />
103
+
104
+ // Luxon
105
+ import { DateTime } from 'luxon'
106
+ <DatePicker value={DateTime.now()} />
107
+ ```
108
+
109
+ #### Changes
110
+
111
+ - [DatePicker] Respect `minDate` and `maxDate` when opening a `DatePicker` or `DateTimePicker` (#6309) @alexfauquette
112
+ - [DateTimePicker] Fix validation with `shouldDisableMonth` and `shouldDisableYear` (#6266) @flaviendelangle
113
+ - [TimePicker] Add support for `disablePast` and `disableFuture` validation props (#6226) @LukasTy
114
+ - [CalendarPicker] Prevent getting focus when `autoFocus=false` (#6304) @alexfauquette
115
+ - [DateField] Extend moment adapter to support `expandFormat` and `formatTokenMap` (#6215) @alexfauquette
116
+ - [pickers] Allow to control the selected sections (#6209, #6307) @flaviendelangle
117
+ - [pickers] Do not loose the value of date sections not present in the format in the new field components (#6141) @flaviendelangle
118
+ - [pickers] Do not support unparsed date formats anymore (#6170) @flaviendelangle
119
+ - [pickers] Support slots on the `DateField` component (#6048) @flaviendelangle
120
+ - [pickers] Support Luxon v3 in `AdapterLuxon` (#6069) @alexfauquette
121
+ - [pickers] New components `TimeField` and `DateTimeField` (#6312) @flaviendelangle
122
+ - [pickers] Support basic mobile edition on new field components (#5958) @flaviendelangle
123
+
124
+ ### Docs
125
+
126
+ - [docs] Fix issue in DataGrid/DataGridPro row styling demo (#6264) @MBilalShafi
127
+ - [docs] Improve pickers Getting Started examples (#6292) @flaviendelangle
128
+ - [docs] Pass model change callbacks in controlled grid editing demos (#6296) @cherniavskii
129
+ - [docs] Update the CodeSandbox to use the `next` branch (#6275) @oliviertassinari
130
+
131
+ ### Core
132
+
133
+ - [core] Fix typing error (#6291) @flaviendelangle
134
+ - [core] Fix typo in the state updater of `useField` (#6311) @flaviendelangle
135
+ - [core] Remove `GridFeatureModeConstant` (#6077) @DanailH
136
+ - [core] Simplify testing architecture (#6043) @flaviendelangle
137
+ - [test] Skip test in Chrome non-headless and Edge (#6318) @m4theushw
138
+
139
+ ## 6.0.0-alpha.0
140
+
141
+ _Sep 22, 2022_
142
+
143
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
144
+
145
+ - 🌍 Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
146
+ - 🌍 Add Finnish (fi-FI) locale to the pickers (#6219) @PetroSilenius
147
+ - 🌍 Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
148
+ - 📚 Documentation improvements
149
+ - 🐞 Bugfixes
150
+
151
+ ### `@mui/x-data-grid@v6.0.0-alpha.0` / `@mui/x-data-grid-pro@v6.0.0-alpha.0` / `@mui/x-data-grid-premium@v6.0.0-alpha.0`
152
+
153
+ #### Breaking changes
154
+
155
+ - The deprecated `hide` column property has been removed in favor of the `columnVisibilityModel` prop and initial state.
156
+
157
+ ```diff
158
+ <DataGrid
159
+ columns={[
160
+ field: 'id,
161
+ - hide: true,
162
+ ]}
163
+ + initialState={{
164
+ + columns: {
165
+ + columnVisibilityModel: { id: false },
166
+ + }
167
+ + }}
168
+ />
169
+ ```
170
+
171
+ You can find more information about this new API on our [documentation](https://next.mui.com/x/react-data-grid/column-visibility/).
172
+
173
+ - The `GridEvents` enum is now a TypeScript type.
174
+
175
+ ```diff
176
+ - apiRef.current.subscribeEvent(GridEvents.rowClick', handleRowClick)
177
+ + apiRef.current.subscribeEvent('rowClick', handleRowClick)
178
+ ```
18
179
 
19
180
  #### Changes
20
181
 
21
- - [DataGrid] Fix `GridPagination` props typing (#6295) @cherniavskii
22
- - [DataGrid] Fix `GridRow` not forwarding `ref` to the root element (#6303) @cherniavskii
23
- - [DataGrid] Fix `undefined` value being showed in filter button tooltip text (#6271) @cherniavskii
24
- - [DataGrid] Fix blank space when changing page with dynamic row height (#6320) @m4theushw
25
- - [DataGrid] Revert cell/row mode if `processRowUpdate` fails (#6319) @m4theushw
26
- - [DataGridPremium] Add missing `themeAugmentation` module (#6316) @cherniavskii
182
+ - [DataGrid] Do not publish `cellFocusOut` event if the row was removed (#6251) @cherniavskii
183
+ - [DataGrid] Fix scroll anchoring with master details (#6054) @oliviertassinari
184
+ - [DataGrid] Improve Polish (pl-PL) locale on the data grid (#6245) @grzegorz-bach
185
+ - [DataGrid] Remove the `GridEvents` enum (#6003) @flaviendelangle
186
+ - [DataGrid] Remove the deprecated `hide` column property (#5999) @flaviendelangle
187
+
188
+ ### `@mui/x-date-pickers@v6.0.0-alpha.0` / `@mui/x-date-pickers-pro@v6.0.0-alpha.0`
189
+
190
+ #### Breaking changes
191
+
192
+ - All the deprecated props that allowed you to set the text displayed in the pickers have been removed.
193
+
194
+ You can now use the `localText` prop available on all picker components:
195
+
196
+ | Removed prop | Property in the new `localText` prop |
197
+ |------------------------------|-----------------------------------------------------------------------------------|
198
+ | `endText` | `end` |
199
+ | `getClockLabelText` | `clockLabelText` |
200
+ | `getHoursClockNumberText` | `hoursClockNumberText` |
201
+ | `getMinutesClockNumberText` | `minutesClockNumberText` |
202
+ | `getSecondsClockNumberText` | `secondsClockNumberText` |
203
+ | `getViewSwitchingButtonText` | `calendarViewSwitchingButtonAriaLabel` |
204
+ | `leftArrowButtonText` | `openPreviousView` (or `previousMonth` when the button changes the visible month) |
205
+ | `rightArrowButtonText` | `openNextView` (or `nextMonth` when the button changes the visible month) |
206
+ | `startText` | `start` |
207
+
208
+ For instance if you want to replace the `startText` / `endText`
209
+
210
+ ```diff
211
+ <DateRangePicker
212
+ - startText="From"
213
+ - endText="To"
214
+ + localeText={{
215
+ + start: 'From',
216
+ + end: 'To',
217
+ + }}
218
+ />
219
+ ```
220
+
221
+ You can find more information about the new api, including how to set those translations on all your components at once in the [documentation](https://next.mui.com/x/react-date-pickers/localization/)
222
+
223
+ - The component slots `LeftArrowButton` and `RightArrowButton` have been renamed `PreviousIconButton` and `NextIconButton` to better describe there usage:
224
+
225
+ ```diff
226
+ <DatePicker
227
+ components={{
228
+ - LeftArrowButton: CustomButton,
229
+ + PreviousIconButton: CustomButton,
230
+
231
+ - RightArrowButton: CustomButton,
232
+ + NextIconButton: CustomButton,
233
+ }}
234
+
235
+ componentsProps={{
236
+ - leftArrowButton: {},
237
+ + previousIconButton: {},
238
+
239
+ - rightArrowButton: {},
240
+ + nextIconButton: {},
241
+ }}
242
+ />
243
+ ```
244
+
245
+ - The `date` prop has been renamed `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker`.
246
+
247
+ ```diff
248
+ - <MonthPicker date={dayjs()} onChange={handleMonthChange} />
249
+ + <MonthPicker value={dayjs()} onChange={handleMonthChange} />
250
+
251
+ - <YearPicker date={dayjs()} onChange={handleYearChange} />
252
+ + <YearPicker value={dayjs()} onChange={handleYearChange} />
253
+
254
+ - <ClockPicker date={dayjs()} onChange={handleTimeChange} />
255
+ + <ClockPicker value={dayjs()} onChange={handleTimeChange} />
256
+
257
+ - <CalendarPicker date={dayjs()} onChange={handleDateChange} />
258
+ + <CalendarPicker value={dayjs()} onChange={handleDateChange} />
259
+ ```
260
+
261
+ #### Changes
262
+
263
+ - [CalendarPicker] Don't move to closest enabled date when `props.date` contains a disabled date (#6146) @flaviendelangle
264
+ - [DateRangePicker] Switch to new month when changing the value from the outside (#6166) @flaviendelangle
265
+ - [pickers] Add a `localeText` prop to all pickers to customize the translations (#6212) @flaviendelangle
266
+ - [pickers] Add Finnish (fi-FI) locale to the pickers (#6219) (#6230) @PetroSilenius
267
+ - [pickers] Add Persian (fa-IR) locale to the pickers (#6181) @fakhamatia
268
+ - [pickers] Allow nested `LocalizationProvider` (#6011) @flaviendelangle
269
+ - [pickers] Clean slots on `PickersArrowSwitcher` component (#5890) @flaviendelangle
270
+ - [pickers] Fix invalid date error when decreasing `DateField` day (#6071) @alexfauquette
271
+ - [pickers] Fix mobile section selection (#6207) @oliviertassinari
272
+ - [pickers] Fix usage with Typescript 4.8 (#6229) @flaviendelangle
273
+ - [pickers] Improve error message when no adapter context is found (#6211) @flaviendelangle
274
+ - [pickers] Remove `valueStr` from the field state (#6142) @flaviendelangle
275
+ - [pickers] Remove remaining deprecated locale props (#6233) @flaviendelangle
276
+ - [pickers] Rename the `date` prop `value` on `MonthPicker` / `YearPicker`, `ClockPicker` and `CalendarPicker` (#6128) @flaviendelangle
277
+ - [pickers] Rename the `onClose` prop of `PickersPopper` `onDismiss` to simplify typing (#6155) @flaviendelangle
278
+ - [pickers] Support the `sx` prop on all public component with a root HTML elements (#5944) @flaviendelangle
279
+ - [pickers] Unify `PickersMonth` and `PickersYear` behaviors (#6034) @flaviendelangle
280
+ - [pickers] Use `shouldDisableMonth` and `shouldDisableYear` for date validation (#6066) @flaviendelangle
281
+ - [YearPicker] Scroll to the current year even with `autoFocus=false` (#6224) @alexfauquette
27
282
 
28
283
  ### Docs
29
284
 
30
- - [docs] Pass model change callbacks in controlled grid editing demos (#6306) @cherniavskii
285
+ - [docs] Add automatic vale check (#5429) @alexfauquette
286
+ - [docs] Add Pro logo in "column ordering" link (#6127) @alexfauquette
287
+ - [docs] Fix 301 link (#6239) @oliviertassinari
288
+ - [docs] Fix broken link (#6163) @alexfauquette
289
+ - [docs] Fix broken links (#6101) @alexfauquette
290
+ - [docs] Fix demonstration date to avoid hydration errors (#6032) @alexfauquette
291
+ - [docs] Fix hidden popper in restore state example (#6191) @heyfirst
292
+ - [docs] Fix invalid links causing 404 & 301 errors (#6105) @oliviertassinari
293
+ - [docs] Fix npm repository url in the pickers `package.json` (#6172) @oliviertassinari
294
+ - [docs] Fix typo in linked issue (#6162) @flaviendelangle
295
+ - [docs] Import `generateUtilityClass` from `@mui/utils` (#6216) @michaldudak
296
+ - [docs] Improve Upgrade plan docs (#6018) @oliviertassinari
297
+ - [docs] Link the OpenSSF Best Practices card (#6171) @oliviertassinari
31
298
 
32
299
  ### Core
33
300
 
34
- - [core] Reduce the amount of updated screenshots reported by Argos (#6310) @cherniavskii
301
+ - [core] Add `v5.17.3` changelog to next branch (#6250) @flaviendelangle
302
+ - [core] Add link to the security page on the `README` (#6073) @oliviertassinari
303
+ - [core] Fix scroll restoration in the docs (#5938) @oliviertassinari
304
+ - [core] Remove the Storybook (#6099) @flaviendelangle
305
+ - [core] Tag release as `next` in NPM (#6256) @m4theushw
306
+ - [core] Update monorepo (#6180) @flaviendelangle
307
+ - [core] Use the `next` branch for Prettier (#6097) @flaviendelangle
308
+ - [core] Use the official repository for `@mui/monorepo` instead of a fork (#6189) @oliviertassinari
309
+ - [test] Fix logic to skip column pinning tests (#6133) @m4theushw
310
+ - [test] Hide the date on the print regression test (#6120) @flaviendelangle
311
+ - [test] Skip tests for column pinning and dynamic row height (#5997) @m4theushw
312
+ - [website] Improve security header @oliviertassinari
35
313
 
36
- ## 5.17.4
314
+ ## v5.17.4
37
315
 
38
316
  _Sep 22, 2022_
39
317
 
@@ -165,7 +443,7 @@ We'd like to offer a big thanks to the 3 contributors who made this release poss
165
443
 
166
444
  _Sep 2, 2022_
167
445
 
168
- 🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
446
+ 🎉 We are excited to finally introduce a stable release (v5.0.0) for the `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` packages!
169
447
 
170
448
  If you are still using picker components from the `lab`, take a look at the [migration guide](https://mui.com/x/react-date-pickers/migration-lab/).
171
449
 
@@ -1470,7 +1748,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
1470
1748
  - [DataGrid] Stop checkbox ripple on blur (#3835) @m4theushw
1471
1749
  - [DataGrid] Stop calling `onRowClick` when clicking in cells with interactive elements (#3929) @m4theushw
1472
1750
  - [DataGrid] Use only `headerName` when available to search column (#3959) @pkratz
1473
- - [DataGrid] Use the bundling scripts as the packages published by the [https://github.com/mui/material-ui](material-ui) repository (#3965) @flaviendelangle
1751
+ - [DataGrid] Use the bundling scripts as the packages published by the [material-ui](https://github.com/mui/material-ui) repository (#3965) @flaviendelangle
1474
1752
  - [DataGridPro] Add `unstable_setRowHeight` method to `apiRef` (#3751) @cherniavskii
1475
1753
  - [DataGridPro] Always export the `pageSize` and `page` when it has been initialized or is being controlled (#3908) @flaviendelangle
1476
1754
  - [DataGridPro] Disable export for detail panel column (#4057) @gustavhagland
@@ -4115,7 +4393,7 @@ Big thanks to the 7 contributors who made this release possible. Here are some h
4115
4393
 
4116
4394
  - 💄 Release the cell editing feature (#1287) @dtassone
4117
4395
 
4118
- This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing/#cell-editing). We have spent the last three months working on it.
4396
+ This is the first release of the Cell editing feature. You can find the documentation [following this link](https://mui.com/x/react-data-grid/editing/). We have spent the last three months working on it.
4119
4397
 
4120
4398
  ![cell edit](https://user-images.githubusercontent.com/3165635/115632215-87994700-a307-11eb-91d9-9f5537df0911.gif)
4121
4399
 
@@ -4725,7 +5003,7 @@ _Dec 9, 2020_
4725
5003
 
4726
5004
  Big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
4727
5005
 
4728
- - 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/rendering/#density) feature (#606) @DanailH.
5006
+ - 🔍 Add a new data grid [density selector](https://mui.com/x/react-data-grid/accessibility/#density) feature (#606) @DanailH.
4729
5007
  - 💄 A first iteration on the data grid's toolbar.
4730
5008
  - 🧪 Continue the iteration on the data grid filtering feature, soon to be released @dtassone.
4731
5009
 
@@ -475,16 +475,6 @@ DataGridRaw.propTypes = {
475
475
  */
476
476
  onColumnOrderChange: PropTypes.func,
477
477
 
478
- /**
479
- * Callback fired when a column visibility changes.
480
- * Only works when no `columnVisibilityModel` is provided and if we change the visibility of a single column at a time.
481
- * @param {GridColumnVisibilityChangeParams} params With all properties from [[GridColumnVisibilityChangeParams]].
482
- * @param {MuiEvent<{}>} event The event object.
483
- * @param {GridCallbackDetails} details Additional details for this callback.
484
- * @deprecated Use `onColumnVisibilityModelChange` instead.
485
- */
486
- onColumnVisibilityChange: PropTypes.func,
487
-
488
478
  /**
489
479
  * Callback fired when the column visibility model changes.
490
480
  * @param {GridColumnVisibilityModel} model The new model.
@@ -721,7 +711,7 @@ DataGridRaw.propTypes = {
721
711
  /**
722
712
  * Set of rows of type [[GridRowsProp]].
723
713
  */
724
- rows: PropTypes.array.isRequired,
714
+ rows: PropTypes.arrayOf(PropTypes.object).isRequired,
725
715
 
726
716
  /**
727
717
  * Sets the type of space between rows added by `getRowSpacing`.
@@ -2,7 +2,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { useThemeProps } from '@mui/material/styles';
4
4
  import { DATA_GRID_DEFAULT_SLOTS_COMPONENTS, GRID_DEFAULT_LOCALE_TEXT } from '../constants';
5
- import { GridDensityTypes, GridEditModes, GridFeatureModeConstant } from '../models';
5
+ import { GridDensityTypes, GridEditModes } from '../models';
6
6
  const DATA_GRID_FORCED_PROPS = {
7
7
  apiRef: undefined,
8
8
  disableMultipleColumnsFiltering: true,
@@ -43,7 +43,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
43
43
  disableVirtualization: false,
44
44
  disableIgnoreModificationsIfProcessingProps: false,
45
45
  editMode: GridEditModes.Cell,
46
- filterMode: GridFeatureModeConstant.client,
46
+ filterMode: 'client',
47
47
  headerHeight: 56,
48
48
  hideFooter: false,
49
49
  hideFooterPagination: false,
@@ -52,14 +52,14 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
52
52
  logger: console,
53
53
  logLevel: process.env.NODE_ENV === 'production' ? 'error' : 'warn',
54
54
  pagination: false,
55
- paginationMode: GridFeatureModeConstant.client,
55
+ paginationMode: 'client',
56
56
  rowHeight: 52,
57
57
  rowsPerPageOptions: [25, 50, 100],
58
58
  rowSpacingType: 'margin',
59
59
  showCellRightBorder: false,
60
60
  showColumnRightBorder: false,
61
61
  sortingOrder: ['asc', 'desc', null],
62
- sortingMode: GridFeatureModeConstant.client,
62
+ sortingMode: 'client',
63
63
  throttleRowsMs: 0,
64
64
  disableColumnReorder: false,
65
65
  disableColumnResize: false,
@@ -9,7 +9,6 @@ export const GRID_STRING_COL_DEF = {
9
9
  width: 100,
10
10
  minWidth: 50,
11
11
  maxWidth: Infinity,
12
- hide: false,
13
12
  hideable: true,
14
13
  sortable: true,
15
14
  resizable: true,
@@ -6,7 +6,9 @@ import { GridVirtualScroller } from './virtualization/GridVirtualScroller';
6
6
  import { GridVirtualScrollerContent } from './virtualization/GridVirtualScrollerContent';
7
7
  import { GridVirtualScrollerRenderZone } from './virtualization/GridVirtualScrollerRenderZone';
8
8
  import { useGridVirtualScroller } from '../hooks/features/virtualization/useGridVirtualScroller';
9
+ import { GridOverlays } from './base/GridOverlays';
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
+ import { jsxs as _jsxs } from "react/jsx-runtime";
10
12
  const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridVirtualScroller(props, ref) {
11
13
  const {
12
14
  className,
@@ -23,14 +25,14 @@ const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridV
23
25
  ref,
24
26
  disableVirtualization
25
27
  });
26
- return /*#__PURE__*/_jsx(GridVirtualScroller, _extends({
28
+ return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({
27
29
  className: className
28
30
  }, getRootProps(other), {
29
- children: /*#__PURE__*/_jsx(GridVirtualScrollerContent, _extends({}, getContentProps(), {
31
+ children: [/*#__PURE__*/_jsx(GridOverlays, {}), /*#__PURE__*/_jsx(GridVirtualScrollerContent, _extends({}, getContentProps(), {
30
32
  children: /*#__PURE__*/_jsx(GridVirtualScrollerRenderZone, _extends({}, getRenderZoneProps(), {
31
33
  children: getRows()
32
34
  }))
33
- }))
35
+ }))]
34
36
  }));
35
37
  });
36
38
  export { DataGridVirtualScroller };
@@ -18,7 +18,7 @@ import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../colDef/gridCheckboxSelection
18
18
  import { GRID_ACTIONS_COLUMN_TYPE } from '../colDef/gridActionsColDef';
19
19
  import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '../constants/gridDetailPanelToggleField';
20
20
  import { gridSortModelSelector } from '../hooks/features/sorting/gridSortingSelector';
21
- import { gridRowTreeDepthSelector } from '../hooks/features/rows/gridRowsSelector';
21
+ import { gridRowMaximumTreeDepthSelector } from '../hooks/features/rows/gridRowsSelector';
22
22
  import { gridDensityHeaderGroupingMaxDepthSelector } from '../hooks/features/density/densitySelector';
23
23
  import { randomNumberBetween } from '../utils/utils';
24
24
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -88,7 +88,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
88
88
  const currentPage = useGridVisibleRows(apiRef, rootProps);
89
89
  const columnsTotalWidth = useGridSelector(apiRef, gridColumnsTotalWidthSelector);
90
90
  const sortModel = useGridSelector(apiRef, gridSortModelSelector);
91
- const treeDepth = useGridSelector(apiRef, gridRowTreeDepthSelector);
91
+ const treeDepth = useGridSelector(apiRef, gridRowMaximumTreeDepthSelector);
92
92
  const headerGroupingMaxDepth = useGridSelector(apiRef, gridDensityHeaderGroupingMaxDepthSelector);
93
93
  const handleRef = useForkRef(ref, refProp);
94
94
  const ariaRowIndex = index + headerGroupingMaxDepth + 2; // 1 for the header row and 1 as it's 1-based
@@ -333,6 +333,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
333
333
  }
334
334
 
335
335
  const randomNumber = randomNumberBetween(10000, 20, 80);
336
+ const rowType = apiRef.current.getRowNode(rowId).type;
336
337
  const cells = [];
337
338
 
338
339
  for (let i = 0; i < renderedColumns.length; i += 1) {
@@ -344,7 +345,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
344
345
  const cellColSpanInfo = apiRef.current.unstable_getCellColSpanInfo(rowId, indexRelativeToAllColumns);
345
346
 
346
347
  if (cellColSpanInfo && !cellColSpanInfo.spannedByColSpan) {
347
- if (row) {
348
+ if (rowType !== 'skeletonRow') {
348
349
  const {
349
350
  colSpan,
350
351
  width
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types';
3
3
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
4
4
  import { GridMainContainer } from '../containers/GridMainContainer';
5
5
  import { GridAutoSizer } from '../GridAutoSizer';
6
- import { GridOverlays } from './GridOverlays';
7
6
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
8
7
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
9
8
  import { gridDensityTotalHeaderHeightSelector } from '../../hooks/features/density/densitySelector';
@@ -51,7 +50,7 @@ function GridBody(props) {
51
50
  apiRef.current.publishEvent('resize', size);
52
51
  }, [apiRef]);
53
52
  return /*#__PURE__*/_jsxs(GridMainContainer, {
54
- children: [/*#__PURE__*/_jsx(GridOverlays, {}), /*#__PURE__*/_jsx(ColumnHeadersComponent, {
53
+ children: [/*#__PURE__*/_jsx(ColumnHeadersComponent, {
55
54
  ref: columnsContainerRef,
56
55
  innerRef: columnHeadersRef
57
56
  }), /*#__PURE__*/_jsx(GridAutoSizer, {
@@ -1,20 +1,55 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
4
+ import { styled } from '@mui/material/styles';
5
+ import { unstable_composeClasses as composeClasses } from '@mui/material';
6
+ import clsx from 'clsx';
4
7
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
5
8
  import { gridVisibleRowCountSelector } from '../../hooks/features/filter/gridFilterSelector';
6
9
  import { gridRowCountSelector, gridRowsLoadingSelector } from '../../hooks/features/rows/gridRowsSelector';
7
10
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
8
11
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
9
- import { gridDensityTotalHeaderHeightSelector } from '../../hooks/features/density/densitySelector';
12
+ import { getMinimalContentHeight } from '../../hooks/features/rows/gridRowsUtils';
13
+ import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
14
  import { jsx as _jsx } from "react/jsx-runtime";
15
+ const GridOverlayWrapperRoot = styled('div', {
16
+ name: 'MuiDataGrid',
17
+ slot: 'OverlayWrapper',
18
+ overridesResolver: (props, styles) => styles.overlayWrapper
19
+ })({
20
+ position: 'sticky',
21
+ // To stay in place while scrolling
22
+ top: 0,
23
+ left: 0,
24
+ width: 0,
25
+ // To stay above the content instead of shifting it down
26
+ height: 0,
27
+ // To stay above the content instead of shifting it down
28
+ zIndex: 4 // Should be above pinned columns, pinned rows and detail panel
29
+
30
+ });
31
+ const GridOverlayWrapperInner = styled('div', {
32
+ name: 'MuiDataGrid',
33
+ slot: 'OverlayWrapperInner',
34
+ overridesResolver: (props, styles) => styles.overlayWrapperInner
35
+ })({});
36
+
37
+ const useUtilityClasses = ownerState => {
38
+ const {
39
+ classes
40
+ } = ownerState;
41
+ const slots = {
42
+ root: ['overlayWrapper'],
43
+ inner: ['overlayWrapperInner']
44
+ };
45
+ return composeClasses(slots, getDataGridUtilityClass, classes);
46
+ };
11
47
 
12
48
  function GridOverlayWrapper(props) {
13
49
  var _viewportInnerSize$he, _viewportInnerSize$wi;
14
50
 
15
51
  const apiRef = useGridApiContext();
16
52
  const rootProps = useGridRootProps();
17
- const totalHeaderHeight = useGridSelector(apiRef, gridDensityTotalHeaderHeightSelector);
18
53
  const [viewportInnerSize, setViewportInnerSize] = React.useState(() => {
19
54
  var _apiRef$current$getRo, _apiRef$current$getRo2;
20
55
 
@@ -31,22 +66,27 @@ function GridOverlayWrapper(props) {
31
66
  let height = (_viewportInnerSize$he = viewportInnerSize == null ? void 0 : viewportInnerSize.height) != null ? _viewportInnerSize$he : 0;
32
67
 
33
68
  if (rootProps.autoHeight && height === 0) {
34
- height = 'auto';
69
+ height = getMinimalContentHeight(apiRef); // Give room to show the overlay when there no rows.
35
70
  }
36
71
 
72
+ const classes = useUtilityClasses(_extends({}, props, {
73
+ classes: rootProps.classes
74
+ }));
75
+
37
76
  if (!viewportInnerSize) {
38
77
  return null;
39
78
  }
40
79
 
41
- return /*#__PURE__*/_jsx("div", _extends({
42
- style: {
43
- height,
44
- width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0,
45
- position: 'absolute',
46
- top: totalHeaderHeight,
47
- bottom: height === 'auto' ? 0 : undefined
48
- }
49
- }, props));
80
+ return /*#__PURE__*/_jsx(GridOverlayWrapperRoot, {
81
+ className: clsx(classes.root),
82
+ children: /*#__PURE__*/_jsx(GridOverlayWrapperInner, _extends({
83
+ className: clsx(classes.inner),
84
+ style: {
85
+ height,
86
+ width: (_viewportInnerSize$wi = viewportInnerSize == null ? void 0 : viewportInnerSize.width) != null ? _viewportInnerSize$wi : 0
87
+ }
88
+ }, props))
89
+ });
50
90
  }
51
91
 
52
92
  export function GridOverlays() {
@@ -261,7 +261,7 @@ process.env.NODE_ENV !== "production" ? GridActionsCell.propTypes = {
261
261
  /**
262
262
  * The row model of the row that the current cell belongs to.
263
263
  */
264
- row: PropTypes.object.isRequired,
264
+ row: PropTypes.any.isRequired,
265
265
 
266
266
  /**
267
267
  * The node of the row that the current cell belongs to.
@@ -7,6 +7,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
7
7
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
8
8
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
9
9
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
10
+ import { isAutoGeneratedRow } from '../../hooks/features/rows/gridRowsUtils';
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
12
 
12
13
  const useUtilityClasses = ownerState => {
@@ -110,7 +111,7 @@ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
110
111
  /**
111
112
  * The row model of the row that the current cell belongs to.
112
113
  */
113
- row: PropTypes.object.isRequired,
114
+ row: PropTypes.any.isRequired,
114
115
 
115
116
  /**
116
117
  * The node of the row that the current cell belongs to.
@@ -131,7 +132,7 @@ process.env.NODE_ENV !== "production" ? GridBooleanCellRaw.propTypes = {
131
132
  const GridBooleanCell = /*#__PURE__*/React.memo(GridBooleanCellRaw);
132
133
  export { GridBooleanCell };
133
134
  export const renderBooleanCell = params => {
134
- if (params.rowNode.isAutoGenerated) {
135
+ if (isAutoGeneratedRow(params.rowNode)) {
135
136
  return '';
136
137
  }
137
138
 
@@ -149,7 +149,7 @@ process.env.NODE_ENV !== "production" ? GridEditBooleanCell.propTypes = {
149
149
  /**
150
150
  * The row model of the row that the current cell belongs to.
151
151
  */
152
- row: PropTypes.object.isRequired,
152
+ row: PropTypes.any.isRequired,
153
153
 
154
154
  /**
155
155
  * The node of the row that the current cell belongs to.