@mui/x-data-grid 6.13.0 → 6.15.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.
Files changed (155) hide show
  1. package/CHANGELOG.md +162 -1
  2. package/DataGrid/useDataGridComponent.js +43 -40
  3. package/README.md +3 -7
  4. package/components/DataGridVirtualScroller.d.ts +1 -4
  5. package/components/DataGridVirtualScroller.js +3 -5
  6. package/components/GridColumnHeaders.js +2 -3
  7. package/components/GridPagination.d.ts +2 -44
  8. package/components/GridRow.js +4 -2
  9. package/components/base/GridBody.d.ts +0 -1
  10. package/components/base/GridBody.js +2 -22
  11. package/components/cell/GridActionsCell.js +2 -2
  12. package/components/cell/GridActionsCellItem.d.ts +10 -54
  13. package/components/cell/GridCell.js +4 -2
  14. package/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  15. package/components/menu/GridMenu.d.ts +1 -2
  16. package/components/menu/GridMenu.js +21 -5
  17. package/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
  18. package/components/panel/GridPanelWrapper.js +2 -2
  19. package/components/panel/filterPanel/GridFilterInputBoolean.js +3 -5
  20. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  21. package/components/toolbar/GridToolbarDensitySelector.js +2 -7
  22. package/components/toolbar/GridToolbarExportContainer.js +1 -9
  23. package/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
  24. package/hooks/features/export/useGridPrintExport.js +37 -7
  25. package/hooks/features/filter/gridFilterUtils.js +10 -6
  26. package/hooks/features/focus/useGridFocus.js +0 -1
  27. package/hooks/features/index.d.ts +1 -0
  28. package/hooks/features/index.js +2 -1
  29. package/hooks/features/virtualization/gridVirtualizationSelectors.d.ts +16 -0
  30. package/hooks/features/virtualization/gridVirtualizationSelectors.js +18 -0
  31. package/hooks/features/virtualization/index.d.ts +2 -0
  32. package/hooks/features/virtualization/index.js +2 -0
  33. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +0 -1
  34. package/hooks/features/virtualization/useGridVirtualScroller.js +53 -36
  35. package/hooks/features/virtualization/useGridVirtualization.d.ts +12 -0
  36. package/hooks/features/virtualization/useGridVirtualization.js +47 -0
  37. package/index.js +1 -1
  38. package/internals/index.d.ts +4 -0
  39. package/internals/index.js +4 -0
  40. package/legacy/DataGrid/useDataGridComponent.js +43 -40
  41. package/legacy/components/DataGridVirtualScroller.js +2 -4
  42. package/legacy/components/GridColumnHeaders.js +2 -3
  43. package/legacy/components/GridRow.js +4 -2
  44. package/legacy/components/base/GridBody.js +2 -26
  45. package/legacy/components/cell/GridActionsCell.js +2 -2
  46. package/legacy/components/cell/GridCell.js +4 -2
  47. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  48. package/legacy/components/menu/GridMenu.js +21 -5
  49. package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
  50. package/legacy/components/panel/GridPanelWrapper.js +2 -2
  51. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +4 -5
  52. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -1
  53. package/legacy/components/toolbar/GridToolbarDensitySelector.js +2 -7
  54. package/legacy/components/toolbar/GridToolbarExportContainer.js +1 -9
  55. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
  56. package/legacy/hooks/features/export/useGridPrintExport.js +44 -12
  57. package/legacy/hooks/features/filter/gridFilterUtils.js +10 -6
  58. package/legacy/hooks/features/focus/useGridFocus.js +0 -1
  59. package/legacy/hooks/features/index.js +2 -1
  60. package/legacy/hooks/features/virtualization/gridVirtualizationSelectors.js +24 -0
  61. package/legacy/hooks/features/virtualization/index.js +2 -0
  62. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +61 -39
  63. package/legacy/hooks/features/virtualization/useGridVirtualization.js +51 -0
  64. package/legacy/index.js +1 -1
  65. package/legacy/internals/index.js +4 -0
  66. package/legacy/locales/faIR.js +25 -27
  67. package/legacy/locales/jaJP.js +25 -27
  68. package/legacy/locales/viVN.js +35 -39
  69. package/legacy/models/api/index.js +1 -2
  70. package/legacy/utils/createControllablePromise.js +11 -0
  71. package/locales/faIR.js +25 -27
  72. package/locales/jaJP.js +25 -27
  73. package/locales/viVN.js +35 -39
  74. package/models/api/gridApiCommon.d.ts +3 -4
  75. package/models/api/gridVirtualizationApi.d.ts +20 -0
  76. package/models/api/index.d.ts +1 -2
  77. package/models/api/index.js +1 -2
  78. package/models/events/gridEventLookup.d.ts +8 -0
  79. package/models/gridExport.d.ts +17 -4
  80. package/models/gridStateCommunity.d.ts +2 -1
  81. package/models/index.d.ts +1 -1
  82. package/modern/DataGrid/useDataGridComponent.js +43 -40
  83. package/modern/components/DataGridVirtualScroller.js +3 -5
  84. package/modern/components/GridColumnHeaders.js +2 -3
  85. package/modern/components/GridRow.js +4 -2
  86. package/modern/components/base/GridBody.js +2 -22
  87. package/modern/components/cell/GridActionsCell.js +2 -2
  88. package/modern/components/cell/GridCell.js +4 -2
  89. package/modern/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  90. package/modern/components/menu/GridMenu.js +20 -5
  91. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +11 -8
  92. package/modern/components/panel/GridPanelWrapper.js +2 -2
  93. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +3 -5
  94. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  95. package/modern/components/toolbar/GridToolbarDensitySelector.js +2 -7
  96. package/modern/components/toolbar/GridToolbarExportContainer.js +1 -9
  97. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
  98. package/modern/hooks/features/export/useGridPrintExport.js +37 -7
  99. package/modern/hooks/features/filter/gridFilterUtils.js +10 -6
  100. package/modern/hooks/features/focus/useGridFocus.js +0 -1
  101. package/modern/hooks/features/index.js +2 -1
  102. package/modern/hooks/features/virtualization/gridVirtualizationSelectors.js +18 -0
  103. package/modern/hooks/features/virtualization/index.js +2 -0
  104. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +52 -36
  105. package/modern/hooks/features/virtualization/useGridVirtualization.js +47 -0
  106. package/modern/index.js +1 -1
  107. package/modern/internals/index.js +4 -0
  108. package/modern/locales/faIR.js +25 -27
  109. package/modern/locales/jaJP.js +25 -27
  110. package/modern/locales/viVN.js +35 -39
  111. package/modern/models/api/index.js +1 -2
  112. package/modern/utils/createControllablePromise.js +11 -0
  113. package/node/DataGrid/useDataGridComponent.js +43 -40
  114. package/node/components/DataGridVirtualScroller.js +3 -5
  115. package/node/components/GridColumnHeaders.js +2 -3
  116. package/node/components/GridRow.js +4 -2
  117. package/node/components/base/GridBody.js +2 -22
  118. package/node/components/cell/GridActionsCell.js +2 -2
  119. package/node/components/cell/GridCell.js +4 -2
  120. package/node/components/columnHeaders/GridColumnHeaderItem.js +2 -1
  121. package/node/components/menu/GridMenu.js +19 -4
  122. package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +10 -7
  123. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +2 -4
  124. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +1 -1
  125. package/node/components/toolbar/GridToolbarDensitySelector.js +2 -7
  126. package/node/components/toolbar/GridToolbarExportContainer.js +1 -9
  127. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +5 -2
  128. package/node/hooks/features/export/useGridPrintExport.js +37 -7
  129. package/node/hooks/features/filter/gridFilterUtils.js +9 -6
  130. package/node/hooks/features/focus/useGridFocus.js +0 -1
  131. package/node/hooks/features/index.js +11 -0
  132. package/node/hooks/features/virtualization/gridVirtualizationSelectors.js +27 -0
  133. package/node/hooks/features/virtualization/index.js +27 -0
  134. package/node/hooks/features/virtualization/useGridVirtualScroller.js +51 -37
  135. package/node/hooks/features/virtualization/useGridVirtualization.js +58 -0
  136. package/node/index.js +1 -1
  137. package/node/internals/index.js +44 -0
  138. package/node/locales/faIR.js +25 -27
  139. package/node/locales/jaJP.js +25 -27
  140. package/node/locales/viVN.js +35 -39
  141. package/node/models/api/index.js +4 -15
  142. package/node/utils/createControllablePromise.js +17 -0
  143. package/package.json +2 -2
  144. package/utils/createControllablePromise.d.ts +5 -0
  145. package/utils/createControllablePromise.js +11 -0
  146. package/models/api/gridDisableVirtualizationApi.d.ts +0 -15
  147. package/models/api/gridVirtualScrollerApi.d.ts +0 -8
  148. package/models/api/gridVirtualScrollerApi.js +0 -1
  149. package/modern/models/api/gridDisableVirtualizationApi.js +0 -1
  150. package/modern/models/api/gridVirtualScrollerApi.js +0 -1
  151. package/node/models/api/gridVirtualScrollerApi.js +0 -5
  152. /package/legacy/models/api/{gridDisableVirtualizationApi.js → gridVirtualizationApi.js} +0 -0
  153. /package/{legacy/models/api/gridVirtualScrollerApi.js → models/api/gridVirtualizationApi.js} +0 -0
  154. /package/{models/api/gridDisableVirtualizationApi.js → modern/models/api/gridVirtualizationApi.js} +0 -0
  155. /package/node/models/api/{gridDisableVirtualizationApi.js → gridVirtualizationApi.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,166 @@
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
+ ## 6.15.0
7
+
8
+ _Sep 22, 2023_
9
+
10
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🚀 Implement columns auto-sizing (#10180) @romgrk
13
+ - 🎁 Add support for `getRowsToExport` option to print export on the data grid (#10084) @zreecespieces
14
+ - 🌍 Improve Finnish (fi-FI) locale
15
+ - 🐞 Bugfixes
16
+ - 📚 Documentation improvements
17
+
18
+ ### Data Grid
19
+
20
+ #### `@mui/x-data-grid@6.15.0`
21
+
22
+ - [DataGrid] Add support for `getRowsToExport` option to print export (#10084) @zreecespieces
23
+ - [DataGrid] Fix dev warning about `InputLabelProps` (#10413) @romgrk
24
+ - [DataGrid] Refactor `GridMenu` prop `onClickAway` to `onClose` (#10411) @romgrk
25
+ - [DataGrid] Restore focus after `GridMenu` closes (#10412) @romgrk
26
+ - [DataGrid] Fix typing of `GridActionsCellItem` (#10344) @romgrk
27
+ - [DataGrid] Hide `eval` from bundlers (#10329) @romgrk
28
+ - [DataGrid] Add `border: 0` to unmounted focused cell to avoid layout shifts in that row (#10318) @lauri865
29
+
30
+ #### `@mui/x-data-grid-pro@6.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@6.15.0`, plus:
33
+
34
+ - [DataGridPro] Implement columns auto-sizing (#10180) @romgrk
35
+ - [DataGridPro] Fix keyboard navigation issue in header filters (#10358) @MBilalShafi
36
+ - [DataGridPro] Add missing row hover styles (#10252) @cherniavskii
37
+ - [DataGridPro] Make default filter items have stable references in header filters (#10338) @MBilalShafi
38
+
39
+ #### `@mui/x-data-grid-premium@6.15.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@6.15.0`.
42
+
43
+ ### Date Pickers
44
+
45
+ #### `@mui/x-date-pickers@6.15.0`
46
+
47
+ - [pickers] Support tokens without spaces (#10185) @alexfauquette
48
+ - [l10n] Improve Finnish (fi-FI) locale (#10346) @samijouppila
49
+
50
+ #### `@mui/x-date-pickers-pro@6.15.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
51
+
52
+ Same changes as in `@mui/x-date-pickers@6.15.0`.
53
+
54
+ ### Charts / `@mui/x-charts@6.0.0-alpha.12`
55
+
56
+ - [charts] Fix sparkline scale and rendering (#10402) @alexfauquette
57
+ - [charts] Remove components from `@mui/material` (#10115) @alexfauquette
58
+
59
+ ### Tree View / `@mui/x-tree-view@6.0.0-alpha.4`
60
+
61
+ - [TreeView] Split features into plugins to prepare for Pro version (#10123) @flaviendelangle
62
+
63
+ ### Docs
64
+
65
+ - [docs] Add charts documentation pages to complete pricing table (#10394) @alexfauquette
66
+ - [docs] Add missing MIT packages on the Licensing page (#10348) @flaviendelangle
67
+ - [docs] Clearer component pattern @oliviertassinari
68
+ - [docs] Easier to understand demo (#10370) @oliviertassinari
69
+ - [docs] Fix `301` to Material UI @oliviertassinari
70
+ - [docs] Improve the column visibility section (#10327) @MBilalShafi
71
+ - [docs] Improve the documentation section `rowIdentifier` (#10326) @MBilalShafi
72
+ - [docs] Improve pickers localization documentation (#10202) @flaviendelangle
73
+ - [docs] Polish typescript ref usage (#10359) @oliviertassinari
74
+ - [docs] Improve charts tooltip wording (#10406) @alexfauquette
75
+
76
+ ### Core
77
+
78
+ - [core] Cleanup GitHub issues template (#10372) @romgrk
79
+ - [core] Fix Circle CI OOM (#10385) @romgrk
80
+ - [core] Improve sleep test helper @oliviertassinari
81
+ - [core] Remove unwanted prefixes @oliviertassinari
82
+ - [core] Remove duplicate label @oliviertassinari
83
+ - [core] Simplify source @oliviertassinari
84
+ - [core] Upgrade monorepo (#10425) @cherniavskii
85
+ - [core] Upgrade monorepo to have the new typescript-to-proptype (#10224) @flaviendelangle
86
+ - [test] Do not use deprecated adapter methods (#10416) @flaviendelangle
87
+ - [test] Name test suites according to sentence case (#10429) @alexfauquette
88
+
89
+ ## 6.14.0
90
+
91
+ _Sep 14, 2023_
92
+
93
+ We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights ✨:
94
+
95
+ - 🎁 Fix `YearCalendar` and `MonthCalendar` accessibility (#10312) @LukasTy
96
+
97
+ The `YearCalendar` and `MonthCalendar` items role has been changed from `button` to `radio` in order to improve the component's a11y support.
98
+ If you were relying on the mentioned components having a `button` role for items, you will need to update your usage to expect a `radio` role instead.
99
+
100
+ - 🌍 Improve Japanese (ja-JP), Persian (fa-IR), and Vietnamese (vi-VN) locales on the data grid
101
+ - 🐞 Bugfixes
102
+ - 📚 Documentation improvements
103
+
104
+ ### Data Grid
105
+
106
+ #### `@mui/x-data-grid@6.14.0`
107
+
108
+ - [l10n] Improve Japanese (ja-JP) locale (#10299) @makoto14
109
+ - [l10n] Improve Persian (fa-IR) locale (#10277) @aminsaedi
110
+ - [l10n] Improve Vietnamese (vi-VN) locale (#10280) @khangnguyen2100
111
+
112
+ #### `@mui/x-data-grid-pro@6.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
113
+
114
+ Same changes as in `@mui/x-data-grid@6.14.0`.
115
+
116
+ #### `@mui/x-data-grid-premium@6.14.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
117
+
118
+ Same changes as in `@mui/x-data-grid-pro@6.14.0`, plus:
119
+
120
+ - [DataGridPremium] Fix clipboard import cutting off at 100 rows (#9930) @gitstart
121
+
122
+ ### Date Pickers
123
+
124
+ #### `@mui/x-date-pickers@6.14.0`
125
+
126
+ - [pickers] Fix `YearCalendar` and `MonthCalendar` a11y (#10312) @LukasTy
127
+ - [pickers] Localize `TimeClock` meridiem text (#10324) @LukasTy
128
+
129
+ #### `@mui/x-date-pickers-pro@6.14.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
130
+
131
+ Same changes as in `@mui/x-date-pickers@6.14.0`.
132
+
133
+ ### Charts / `@mui/x-charts@6.0.0-alpha.11`
134
+
135
+ - [charts] Add default `barGapRatio` and increase `categoryGapRatio` (#10317) @LukasTy
136
+ - [charts] Enable `eslint` on the package (#10330) @LukasTy
137
+
138
+ ### Tree View / `@mui/x-tree-view@6.0.0-alpha.3`
139
+
140
+ - [TreeView] Fix box-sizing dependency (#10255) @oliviertassinari
141
+
142
+ ### Docs
143
+
144
+ - [docs] Add conditional range picker props example (#10227) @LukasTy
145
+ - [docs] Add toolbar to the multi-filters demo (#10223) @MBilalShafi
146
+ - [docs] Avoid the use of "We" @oliviertassinari
147
+ - [docs] Clarify MUI vs. MUI Core difference @oliviertassinari
148
+ - [docs] Enable `ariaV7` flag for demos using `useDemoData` hook (#10204) @cherniavskii
149
+ - [docs] Fix Tree View link to API references (#10282) @oliviertassinari
150
+ - [docs] Fix image layout shift (#10313) @oliviertassinari
151
+ - [docs] Fix link to MUI X from readme logo @oliviertassinari
152
+ - [docs] Fix redirection to Base UI URLs @oliviertassinari
153
+ - [docs] Improve Tree View demos (#10268) @oliviertassinari
154
+ - [docs] Improve docs for ref type props (#10273) @michelengelen
155
+ - [docs] Improve npm package README (#10269) @oliviertassinari
156
+ - [docs] Improve the clarity of the npm links @oliviertassinari
157
+ - [docs] Keep installation readme simple @oliviertassinari
158
+ - [docs] Make each component feel more standalone @oliviertassinari
159
+
160
+ ### Core
161
+
162
+ - [core] Add types extension for clarity @oliviertassinari
163
+ - [core] Set logo height to fix layout shift in GitHub @oliviertassinari
164
+ - [core] TrapFocus was renamed to FocusTrap @oliviertassinari
165
+
6
166
  ## 6.13.0
7
167
 
8
168
  _Sep 8, 2023_
@@ -12,6 +172,7 @@ We'd like to offer a big thanks to the 10 contributors who made this release pos
12
172
  - 🎁 Fix `anchorRef` behavior on range pickers (#10077) @LukasTy
13
173
 
14
174
  The range picker popup will now be anchored to the first input element and left aligned like other pickers.
175
+
15
176
  - 🌍 Improve Slovak (sk-SK) locale on the data grid
16
177
  - 🐞 Bugfixes
17
178
  - 📚 Documentation improvements
@@ -1838,7 +1999,7 @@ We'd like to offer a big thanks to the 8 contributors who made this release poss
1838
1999
  #### Changes
1839
2000
 
1840
2001
  - [DataGrid] Add interface for `singleSelect` column (#7685) @m4theushw
1841
- - [DataGrid] Allow to pass props to the `TrapFocus` inside the panel wrapper (#7733) @ivek-Prajapatii
2002
+ - [DataGrid] Allow to pass props to the `FocusTrap` inside the panel wrapper (#7733) @ivek-Prajapatii
1842
2003
  - [DataGrid] Avoid unnecessary rerenders after `updateRows` (#7857) @cherniavskii
1843
2004
  - [DataGridPro] Change cursor when dragging a column (#7725) @sai6855
1844
2005
  - [DataGridPremium] Fix `leafField` to have correct focus value (#7950) @MBilalShafi
@@ -25,53 +25,56 @@ import { rowsMetaStateInitializer, useGridRowsMeta } from '../hooks/features/row
25
25
  import { useGridStatePersistence } from '../hooks/features/statePersistence/useGridStatePersistence';
26
26
  import { useGridColumnSpanning } from '../hooks/features/columns/useGridColumnSpanning';
27
27
  import { useGridColumnGrouping, columnGroupsStateInitializer } from '../hooks/features/columnGrouping/useGridColumnGrouping';
28
+ import { useGridVirtualization, virtualizationStateInitializer } from '../hooks/features/virtualization';
28
29
  export const useDataGridComponent = (inputApiRef, props) => {
29
- const privateApiRef = useGridInitialization(inputApiRef, props);
30
+ const apiRef = useGridInitialization(inputApiRef, props);
30
31
 
31
32
  /**
32
33
  * Register all pre-processors called during state initialization here.
33
34
  */
34
- useGridRowSelectionPreProcessors(privateApiRef, props);
35
- useGridRowsPreProcessors(privateApiRef);
35
+ useGridRowSelectionPreProcessors(apiRef, props);
36
+ useGridRowsPreProcessors(apiRef);
36
37
 
37
38
  /**
38
39
  * Register all state initializers here.
39
40
  */
40
- useGridInitializeState(rowSelectionStateInitializer, privateApiRef, props);
41
- useGridInitializeState(columnsStateInitializer, privateApiRef, props);
42
- useGridInitializeState(rowsStateInitializer, privateApiRef, props);
43
- useGridInitializeState(editingStateInitializer, privateApiRef, props);
44
- useGridInitializeState(focusStateInitializer, privateApiRef, props);
45
- useGridInitializeState(sortingStateInitializer, privateApiRef, props);
46
- useGridInitializeState(preferencePanelStateInitializer, privateApiRef, props);
47
- useGridInitializeState(filterStateInitializer, privateApiRef, props);
48
- useGridInitializeState(densityStateInitializer, privateApiRef, props);
49
- useGridInitializeState(paginationStateInitializer, privateApiRef, props);
50
- useGridInitializeState(rowsMetaStateInitializer, privateApiRef, props);
51
- useGridInitializeState(columnMenuStateInitializer, privateApiRef, props);
52
- useGridInitializeState(columnGroupsStateInitializer, privateApiRef, props);
53
- useGridKeyboardNavigation(privateApiRef, props);
54
- useGridRowSelection(privateApiRef, props);
55
- useGridColumns(privateApiRef, props);
56
- useGridRows(privateApiRef, props);
57
- useGridParamsApi(privateApiRef, props);
58
- useGridColumnSpanning(privateApiRef);
59
- useGridColumnGrouping(privateApiRef, props);
60
- useGridEditing(privateApiRef, props);
61
- useGridFocus(privateApiRef, props);
62
- useGridPreferencesPanel(privateApiRef, props);
63
- useGridFilter(privateApiRef, props);
64
- useGridSorting(privateApiRef, props);
65
- useGridDensity(privateApiRef, props);
66
- useGridPagination(privateApiRef, props);
67
- useGridRowsMeta(privateApiRef, props);
68
- useGridScroll(privateApiRef, props);
69
- useGridColumnMenu(privateApiRef);
70
- useGridCsvExport(privateApiRef, props);
71
- useGridPrintExport(privateApiRef, props);
72
- useGridClipboard(privateApiRef, props);
73
- useGridDimensions(privateApiRef, props);
74
- useGridEvents(privateApiRef, props);
75
- useGridStatePersistence(privateApiRef);
76
- return privateApiRef;
41
+ useGridInitializeState(rowSelectionStateInitializer, apiRef, props);
42
+ useGridInitializeState(columnsStateInitializer, apiRef, props);
43
+ useGridInitializeState(rowsStateInitializer, apiRef, props);
44
+ useGridInitializeState(editingStateInitializer, apiRef, props);
45
+ useGridInitializeState(focusStateInitializer, apiRef, props);
46
+ useGridInitializeState(sortingStateInitializer, apiRef, props);
47
+ useGridInitializeState(preferencePanelStateInitializer, apiRef, props);
48
+ useGridInitializeState(filterStateInitializer, apiRef, props);
49
+ useGridInitializeState(densityStateInitializer, apiRef, props);
50
+ useGridInitializeState(paginationStateInitializer, apiRef, props);
51
+ useGridInitializeState(rowsMetaStateInitializer, apiRef, props);
52
+ useGridInitializeState(columnMenuStateInitializer, apiRef, props);
53
+ useGridInitializeState(columnGroupsStateInitializer, apiRef, props);
54
+ useGridInitializeState(virtualizationStateInitializer, apiRef, props);
55
+ useGridKeyboardNavigation(apiRef, props);
56
+ useGridRowSelection(apiRef, props);
57
+ useGridColumns(apiRef, props);
58
+ useGridRows(apiRef, props);
59
+ useGridParamsApi(apiRef, props);
60
+ useGridColumnSpanning(apiRef);
61
+ useGridColumnGrouping(apiRef, props);
62
+ useGridEditing(apiRef, props);
63
+ useGridFocus(apiRef, props);
64
+ useGridPreferencesPanel(apiRef, props);
65
+ useGridFilter(apiRef, props);
66
+ useGridSorting(apiRef, props);
67
+ useGridDensity(apiRef, props);
68
+ useGridPagination(apiRef, props);
69
+ useGridRowsMeta(apiRef, props);
70
+ useGridScroll(apiRef, props);
71
+ useGridColumnMenu(apiRef);
72
+ useGridCsvExport(apiRef, props);
73
+ useGridPrintExport(apiRef, props);
74
+ useGridClipboard(apiRef, props);
75
+ useGridDimensions(apiRef, props);
76
+ useGridEvents(apiRef, props);
77
+ useGridStatePersistence(apiRef);
78
+ useGridVirtualization(apiRef, props);
79
+ return apiRef;
77
80
  };
package/README.md CHANGED
@@ -1,18 +1,14 @@
1
- # @mui/x-data-grid
1
+ # MUI X Data Grid
2
2
 
3
3
  This package is the Community plan edition of the data grid component.
4
- It's part of MUI X, an open core extension of MUI, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
8
8
  Install the package in your project directory with:
9
9
 
10
10
  ```bash
11
- // with npm
12
11
  npm install @mui/x-data-grid
13
-
14
- // with yarn
15
- yarn add @mui/x-data-grid
16
12
  ```
17
13
 
18
14
  This component has the following peer dependencies that you will need to install as well.
@@ -28,4 +24,4 @@ This component has the following peer dependencies that you will need to install
28
24
 
29
25
  ## Documentation
30
26
 
31
- [The documentation](https://mui.com/x/react-data-grid/)
27
+ Visit [https://mui.com/x/react-data-grid/](https://mui.com/x/react-data-grid/) to view the full documentation.
@@ -1,6 +1,3 @@
1
1
  import * as React from 'react';
2
- interface DataGridVirtualScrollerProps extends React.HTMLAttributes<HTMLDivElement> {
3
- disableVirtualization?: boolean;
4
- }
5
- declare const DataGridVirtualScroller: React.ForwardRefExoticComponent<DataGridVirtualScrollerProps & React.RefAttributes<HTMLDivElement>>;
2
+ declare const DataGridVirtualScroller: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
6
3
  export { DataGridVirtualScroller };
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["className", "disableVirtualization"];
3
+ const _excluded = ["className"];
4
4
  import * as React from 'react';
5
5
  import { GridVirtualScroller } from './virtualization/GridVirtualScroller';
6
6
  import { GridVirtualScrollerContent } from './virtualization/GridVirtualScrollerContent';
@@ -11,8 +11,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
11
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
12
  const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridVirtualScroller(props, ref) {
13
13
  const {
14
- className,
15
- disableVirtualization
14
+ className
16
15
  } = props,
17
16
  other = _objectWithoutPropertiesLoose(props, _excluded);
18
17
  const {
@@ -21,8 +20,7 @@ const DataGridVirtualScroller = /*#__PURE__*/React.forwardRef(function DataGridV
21
20
  getRenderZoneProps,
22
21
  getRows
23
22
  } = useGridVirtualScroller({
24
- ref,
25
- disableVirtualization
23
+ ref
26
24
  });
27
25
  return /*#__PURE__*/_jsxs(GridVirtualScroller, _extends({
28
26
  className: className
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["innerRef", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnPositions", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "densityFactor", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { refType } from '@mui/utils';
6
7
  import { fastMemo } from '../utils/fastMemo';
7
8
  import { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
8
9
  import { GridBaseColumnHeaders } from './columnHeaders/GridBaseColumnHeaders';
@@ -94,9 +95,7 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
94
95
  filterColumnLookup: PropTypes.object.isRequired,
95
96
  hasOtherElementInTabSequence: PropTypes.bool.isRequired,
96
97
  headerGroupingMaxDepth: PropTypes.number.isRequired,
97
- innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({
98
- current: PropTypes.object
99
- })]),
98
+ innerRef: refType,
100
99
  minColumnIndex: PropTypes.number,
101
100
  sortColumnLookup: PropTypes.object.isRequired,
102
101
  visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
@@ -1,48 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Partial<import("@mui/material/TablePagination").TablePaginationBaseProps & {
3
- ActionsComponent?: React.ElementType<import("@mui/material/TablePagination/TablePaginationActions").TablePaginationActionsProps> | undefined;
4
- backIconButtonProps?: Partial<import("@mui/material").IconButtonProps> | undefined;
5
- classes?: Partial<import("@mui/material/TablePagination").TablePaginationClasses> | undefined;
6
- count: number;
7
- getItemAriaLabel?: ((type: "first" | "last" | "next" | "previous") => string) | undefined;
8
- labelDisplayedRows?: ((paginationInfo: import("@mui/material/TablePagination").LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
9
- labelRowsPerPage?: React.ReactNode;
10
- nextIconButtonProps?: Partial<import("@mui/material").IconButtonProps> | undefined;
11
- onPageChange: (event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, page: number) => void;
12
- onRowsPerPageChange?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
13
- page: number;
14
- rowsPerPage: number;
15
- rowsPerPageOptions?: (number | {
16
- value: number;
17
- label: string;
18
- })[] | undefined;
19
- SelectProps?: Partial<import("@mui/material").SelectProps<unknown>> | undefined;
20
- showFirstButton?: boolean | undefined;
21
- showLastButton?: boolean | undefined;
22
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
23
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "content" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
2
+ export declare const GridPagination: React.ForwardRefExoticComponent<(Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | "classes" | "variant" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
24
3
  component?: React.ElementType<any> | undefined;
25
- }>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationBaseProps & {
26
- ActionsComponent?: React.ElementType<import("@mui/material/TablePagination/TablePaginationActions").TablePaginationActionsProps> | undefined;
27
- backIconButtonProps?: Partial<import("@mui/material").IconButtonProps> | undefined;
28
- classes?: Partial<import("@mui/material/TablePagination").TablePaginationClasses> | undefined;
29
- count: number;
30
- getItemAriaLabel?: ((type: "first" | "last" | "next" | "previous") => string) | undefined;
31
- labelDisplayedRows?: ((paginationInfo: import("@mui/material/TablePagination").LabelDisplayedRowsArgs) => React.ReactNode) | undefined;
32
- labelRowsPerPage?: React.ReactNode;
33
- nextIconButtonProps?: Partial<import("@mui/material").IconButtonProps> | undefined;
34
- onPageChange: (event: React.MouseEvent<HTMLButtonElement, MouseEvent> | null, page: number) => void;
35
- onRowsPerPageChange?: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement> | undefined;
36
- page: number;
37
- rowsPerPage: number;
38
- rowsPerPageOptions?: (number | {
39
- value: number;
40
- label: string;
41
- })[] | undefined;
42
- SelectProps?: Partial<import("@mui/material").SelectProps<unknown>> | undefined;
43
- showFirstButton?: boolean | undefined;
44
- showLastButton?: boolean | undefined;
45
- sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
46
- } & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "content" | "size" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | keyof import("@mui/material/OverridableComponent").CommonProps | "variant" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
4
+ }>, "ref"> | Omit<Partial<import("@mui/material/TablePagination").TablePaginationOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("@mui/material/TablePagination").TablePaginationBaseProps, "ref"> & React.RefAttributes<React.Component<any, any, any>>, "hidden" | "color" | "page" | "content" | "size" | "style" | "height" | "translate" | "width" | "padding" | "abbr" | "slot" | "title" | "ref" | "colSpan" | "headers" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoFocus" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "nonce" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "rowSpan" | "scope" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "align" | "valign" | "sx" | "classes" | "variant" | "count" | "getItemAriaLabel" | "onPageChange" | "rowsPerPage" | "showFirstButton" | "showLastButton" | "labelDisplayedRows" | "labelRowsPerPage" | "onRowsPerPageChange" | "rowsPerPageOptions" | "backIconButtonProps" | "nextIconButtonProps" | "sortDirection" | "ActionsComponent" | "SelectProps"> & {
47
5
  component?: React.ElementType<any> | undefined;
48
6
  }>, "ref">) & React.RefAttributes<HTMLDivElement>>;
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
3
+ const _excluded = ["selected", "hovered", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCellColumnIndexNotInRange", "isNotVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
@@ -57,6 +57,7 @@ function EmptyCell({
57
57
  const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
58
58
  const {
59
59
  selected,
60
+ hovered,
60
61
  rowId,
61
62
  row,
62
63
  index,
@@ -92,6 +93,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
92
93
 
93
94
  const ownerState = {
94
95
  selected,
96
+ hovered,
95
97
  isLastVisible,
96
98
  classes: rootProps.classes,
97
99
  editing: apiRef.current.getRowMode(rowId) === GridRowModes.Edit,
@@ -328,7 +330,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
328
330
  "data-id": rowId,
329
331
  "data-rowindex": index,
330
332
  role: "row",
331
- className: clsx(...rowClassNames, classes.root, className),
333
+ className: clsx(...rowClassNames, classes.root, className, hovered && 'Mui-hovered'),
332
334
  "aria-rowindex": ariaRowIndex,
333
335
  "aria-selected": selected,
334
336
  style: style
@@ -4,7 +4,6 @@ interface GridBodyProps {
4
4
  ColumnHeadersProps?: Record<string, any>;
5
5
  VirtualScrollerComponent: React.JSXElementConstructor<React.HTMLAttributes<HTMLDivElement> & {
6
6
  ref: React.Ref<HTMLDivElement>;
7
- disableVirtualization: boolean;
8
7
  }>;
9
8
  }
10
9
  declare function GridBody(props: GridBodyProps): React.JSX.Element;
@@ -39,7 +39,6 @@ function GridBody(props) {
39
39
  const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
40
40
  const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
41
41
  const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
42
- const [isVirtualizationDisabled, setIsVirtualizationDisabled] = React.useState(rootProps.disableVirtualization);
43
42
  useEnhancedEffect(() => {
44
43
  apiRef.current.computeSizeAndPublishResizeEvent();
45
44
  const elementToObserve = rootRef.current;
@@ -49,7 +48,7 @@ function GridBody(props) {
49
48
  let animationFrame;
50
49
  const observer = new ResizeObserver(() => {
51
50
  // See https://github.com/mui/mui-x/issues/8733
52
- animationFrame = window.requestAnimationFrame(() => {
51
+ animationFrame = requestAnimationFrame(() => {
53
52
  apiRef.current.computeSizeAndPublishResizeEvent();
54
53
  });
55
54
  });
@@ -65,24 +64,6 @@ function GridBody(props) {
65
64
  }
66
65
  };
67
66
  }, [apiRef]);
68
- const disableVirtualization = React.useCallback(() => {
69
- setIsVirtualizationDisabled(true);
70
- }, []);
71
- const enableVirtualization = React.useCallback(() => {
72
- setIsVirtualizationDisabled(false);
73
- }, []);
74
- React.useEffect(() => {
75
- setIsVirtualizationDisabled(rootProps.disableVirtualization);
76
- }, [rootProps.disableVirtualization]);
77
-
78
- // The `useGridApiMethod` hook can't be used here, because it only installs the
79
- // method if it doesn't exist yet. Once installed, it's never updated again.
80
- // This break the methods above, since their closure comes from the first time
81
- // they were installed. Which means that calling `setIsVirtualizationDisabled`
82
- // will trigger a re-render, but it won't update the state. That can be solved
83
- // by migrating the virtualization status to the global state.
84
- apiRef.current.unstable_disableVirtualization = disableVirtualization;
85
- apiRef.current.unstable_enableVirtualization = enableVirtualization;
86
67
  const columnHeadersRef = React.useRef(null);
87
68
  const columnsContainerRef = React.useRef(null);
88
69
  const virtualScrollerRef = React.useRef(null);
@@ -119,8 +100,7 @@ function GridBody(props) {
119
100
  // If this event is published while dimensions haven't been computed,
120
101
  // the `onFetchRows` prop won't be called during mount.
121
102
  , {
122
- ref: virtualScrollerRef,
123
- disableVirtualization: isVirtualizationDisabled
103
+ ref: virtualScrollerRef
124
104
  }), children]
125
105
  });
126
106
  }
@@ -165,11 +165,11 @@ function GridActionsCell(props) {
165
165
  fontSize: "small"
166
166
  })
167
167
  })), menuButtons.length > 0 && /*#__PURE__*/_jsx(GridMenu, {
168
- onClickAway: hideMenu,
169
- onClick: hideMenu,
170
168
  open: open,
171
169
  target: buttonRef.current,
172
170
  position: position,
171
+ onClose: hideMenu,
172
+ onClick: hideMenu,
173
173
  children: /*#__PURE__*/_jsx(MenuList, {
174
174
  id: menuId,
175
175
  className: gridClasses.menuList,