@mui/x-data-grid 5.12.0 → 5.12.3

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 (289) hide show
  1. package/CHANGELOG.md +160 -7
  2. package/colDef/gridCheckboxSelectionColDef.d.ts +1 -0
  3. package/colDef/gridCheckboxSelectionColDef.js +2 -1
  4. package/colDef/gridDateOperators.d.ts +1 -1
  5. package/colDef/gridNumericColDef.js +1 -1
  6. package/components/cell/GridBooleanCell.js +4 -3
  7. package/components/cell/GridEditBooleanCell.js +4 -3
  8. package/components/cell/GridEditDateCell.js +4 -3
  9. package/components/cell/GridEditInputCell.js +4 -3
  10. package/components/cell/GridEditSingleSelectCell.js +9 -7
  11. package/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  12. package/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  13. package/components/columnSelection/GridHeaderCheckbox.js +0 -1
  14. package/components/containers/GridRootStyles.js +4 -1
  15. package/components/panel/GridColumnsPanel.js +3 -6
  16. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +3 -2
  17. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
  18. package/components/panel/filterPanel/GridFilterPanel.js +2 -5
  19. package/components/toolbar/GridToolbarColumnsButton.js +0 -1
  20. package/components/toolbar/GridToolbarDensitySelector.js +0 -1
  21. package/components/toolbar/GridToolbarExportContainer.js +0 -1
  22. package/components/toolbar/GridToolbarFilterButton.js +0 -1
  23. package/components/toolbar/GridToolbarQuickFilter.d.ts +7 -0
  24. package/components/toolbar/GridToolbarQuickFilter.js +57 -4
  25. package/constants/defaultGridSlotsComponents.js +2 -1
  26. package/constants/localeTextConstants.js +1 -0
  27. package/hooks/core/useGridStateInitialization.js +19 -6
  28. package/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  29. package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
  30. package/hooks/features/columns/useGridColumnSpanning.js +1 -1
  31. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  32. package/hooks/features/columns/useGridColumns.js +1 -1
  33. package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
  34. package/hooks/features/dimensions/useGridDimensions.js +9 -8
  35. package/hooks/features/editRows/useGridEditing.old.js +1 -1
  36. package/hooks/features/filter/gridFilterSelector.d.ts +5 -0
  37. package/hooks/features/filter/gridFilterSelector.js +6 -0
  38. package/hooks/features/filter/gridFilterState.d.ts +1 -1
  39. package/hooks/features/filter/gridFilterUtils.d.ts +1 -1
  40. package/hooks/features/filter/gridFilterUtils.js +10 -9
  41. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  42. package/hooks/features/filter/useGridFilter.js +24 -7
  43. package/hooks/features/pagination/useGridPage.js +1 -1
  44. package/hooks/features/pagination/useGridPageSize.js +1 -1
  45. package/hooks/features/rows/useGridRows.js +15 -2
  46. package/hooks/features/rows/useGridRowsMeta.js +79 -77
  47. package/hooks/features/selection/useGridSelection.js +1 -1
  48. package/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  49. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  50. package/hooks/features/sorting/useGridSorting.js +1 -1
  51. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  52. package/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  53. package/index.js +1 -1
  54. package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -1
  55. package/legacy/colDef/gridNumericColDef.js +1 -1
  56. package/legacy/components/cell/GridBooleanCell.js +3 -1
  57. package/legacy/components/cell/GridEditBooleanCell.js +4 -2
  58. package/legacy/components/cell/GridEditDateCell.js +4 -2
  59. package/legacy/components/cell/GridEditInputCell.js +4 -2
  60. package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
  61. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  62. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  63. package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -1
  64. package/legacy/components/containers/GridRootStyles.js +7 -5
  65. package/legacy/components/panel/GridColumnsPanel.js +5 -6
  66. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
  67. package/legacy/components/panel/filterPanel/GridFilterPanel.js +3 -6
  68. package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -1
  69. package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -1
  70. package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -1
  71. package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -1
  72. package/legacy/components/toolbar/GridToolbarQuickFilter.js +67 -6
  73. package/legacy/constants/defaultGridSlotsComponents.js +2 -1
  74. package/legacy/constants/localeTextConstants.js +1 -0
  75. package/legacy/hooks/core/useGridStateInitialization.js +18 -6
  76. package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  77. package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -1
  78. package/legacy/hooks/features/columns/useGridColumns.js +1 -1
  79. package/legacy/hooks/features/dimensions/useGridDimensions.js +9 -8
  80. package/legacy/hooks/features/editRows/useGridEditing.old.js +1 -1
  81. package/legacy/hooks/features/filter/gridFilterSelector.js +8 -0
  82. package/legacy/hooks/features/filter/gridFilterUtils.js +11 -10
  83. package/legacy/hooks/features/filter/useGridFilter.js +28 -7
  84. package/legacy/hooks/features/pagination/useGridPage.js +1 -1
  85. package/legacy/hooks/features/pagination/useGridPageSize.js +1 -1
  86. package/legacy/hooks/features/rows/useGridRows.js +17 -2
  87. package/legacy/hooks/features/rows/useGridRowsMeta.js +81 -77
  88. package/legacy/hooks/features/selection/useGridSelection.js +1 -1
  89. package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  90. package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
  91. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  92. package/legacy/index.js +1 -1
  93. package/legacy/locales/arSD.js +1 -0
  94. package/legacy/locales/bgBG.js +1 -0
  95. package/legacy/locales/csCZ.js +1 -0
  96. package/legacy/locales/daDK.js +1 -0
  97. package/legacy/locales/deDE.js +1 -0
  98. package/legacy/locales/elGR.js +1 -0
  99. package/legacy/locales/esES.js +1 -0
  100. package/legacy/locales/faIR.js +1 -0
  101. package/legacy/locales/fiFI.js +1 -0
  102. package/legacy/locales/frFR.js +1 -0
  103. package/legacy/locales/heIL.js +1 -0
  104. package/legacy/locales/huHU.js +1 -0
  105. package/legacy/locales/index.js +1 -0
  106. package/legacy/locales/itIT.js +1 -0
  107. package/legacy/locales/jaJP.js +29 -24
  108. package/legacy/locales/koKR.js +1 -0
  109. package/legacy/locales/nbNO.js +1 -0
  110. package/legacy/locales/nlNL.js +1 -0
  111. package/legacy/locales/plPL.js +1 -0
  112. package/legacy/locales/ptBR.js +1 -0
  113. package/legacy/locales/ruRU.js +7 -6
  114. package/legacy/locales/skSK.js +1 -0
  115. package/legacy/locales/svSE.js +128 -0
  116. package/legacy/locales/trTR.js +1 -0
  117. package/legacy/locales/ukUA.js +1 -0
  118. package/legacy/locales/viVN.js +1 -0
  119. package/legacy/locales/zhCN.js +1 -0
  120. package/locales/arSD.js +1 -0
  121. package/locales/bgBG.js +1 -0
  122. package/locales/csCZ.js +1 -0
  123. package/locales/daDK.js +1 -0
  124. package/locales/deDE.js +1 -0
  125. package/locales/elGR.js +1 -0
  126. package/locales/esES.js +1 -0
  127. package/locales/faIR.js +1 -0
  128. package/locales/fiFI.js +1 -0
  129. package/locales/frFR.js +1 -0
  130. package/locales/heIL.js +1 -0
  131. package/locales/huHU.js +1 -0
  132. package/locales/index.d.ts +1 -0
  133. package/locales/index.js +1 -0
  134. package/locales/itIT.js +1 -0
  135. package/locales/jaJP.js +25 -24
  136. package/locales/koKR.js +1 -0
  137. package/locales/nbNO.js +1 -0
  138. package/locales/nlNL.js +1 -0
  139. package/locales/plPL.js +1 -0
  140. package/locales/ptBR.js +1 -0
  141. package/locales/ruRU.js +7 -6
  142. package/locales/skSK.js +1 -0
  143. package/locales/svSE.d.ts +2 -0
  144. package/locales/svSE.js +116 -0
  145. package/locales/trTR.js +1 -0
  146. package/locales/ukUA.js +1 -0
  147. package/locales/viVN.js +1 -0
  148. package/locales/zhCN.js +1 -0
  149. package/models/api/gridCallbackDetails.d.ts +6 -1
  150. package/models/api/gridFilterApi.d.ts +8 -1
  151. package/models/api/gridLocaleTextApi.d.ts +1 -0
  152. package/models/api/gridStateApi.d.ts +14 -3
  153. package/models/colDef/gridColDef.d.ts +1 -1
  154. package/models/events/gridEventLookup.d.ts +3 -0
  155. package/models/gridIconSlotsComponent.d.ts +5 -0
  156. package/models/props/DataGridProps.d.ts +1 -1
  157. package/modern/colDef/gridCheckboxSelectionColDef.js +2 -1
  158. package/modern/colDef/gridNumericColDef.js +1 -1
  159. package/modern/components/cell/GridBooleanCell.js +4 -3
  160. package/modern/components/cell/GridEditBooleanCell.js +4 -3
  161. package/modern/components/cell/GridEditDateCell.js +4 -3
  162. package/modern/components/cell/GridEditInputCell.js +4 -3
  163. package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
  164. package/modern/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  165. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  166. package/modern/components/columnSelection/GridHeaderCheckbox.js +0 -1
  167. package/modern/components/containers/GridRootStyles.js +4 -1
  168. package/modern/components/panel/GridColumnsPanel.js +3 -6
  169. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
  170. package/modern/components/panel/filterPanel/GridFilterPanel.js +2 -5
  171. package/modern/components/toolbar/GridToolbarColumnsButton.js +0 -1
  172. package/modern/components/toolbar/GridToolbarDensitySelector.js +0 -1
  173. package/modern/components/toolbar/GridToolbarExportContainer.js +0 -1
  174. package/modern/components/toolbar/GridToolbarFilterButton.js +0 -1
  175. package/modern/components/toolbar/GridToolbarQuickFilter.js +57 -4
  176. package/modern/constants/defaultGridSlotsComponents.js +2 -1
  177. package/modern/constants/localeTextConstants.js +1 -0
  178. package/modern/hooks/core/useGridStateInitialization.js +19 -6
  179. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  180. package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -1
  181. package/modern/hooks/features/columns/useGridColumns.js +1 -1
  182. package/modern/hooks/features/dimensions/useGridDimensions.js +9 -8
  183. package/modern/hooks/features/editRows/useGridEditing.old.js +1 -1
  184. package/modern/hooks/features/filter/gridFilterSelector.js +6 -0
  185. package/modern/hooks/features/filter/gridFilterUtils.js +10 -9
  186. package/modern/hooks/features/filter/useGridFilter.js +24 -7
  187. package/modern/hooks/features/pagination/useGridPage.js +1 -1
  188. package/modern/hooks/features/pagination/useGridPageSize.js +1 -1
  189. package/modern/hooks/features/rows/useGridRows.js +15 -2
  190. package/modern/hooks/features/rows/useGridRowsMeta.js +77 -75
  191. package/modern/hooks/features/selection/useGridSelection.js +1 -1
  192. package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  193. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  194. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  195. package/modern/index.js +1 -1
  196. package/modern/locales/arSD.js +1 -0
  197. package/modern/locales/bgBG.js +1 -0
  198. package/modern/locales/csCZ.js +1 -0
  199. package/modern/locales/daDK.js +1 -0
  200. package/modern/locales/deDE.js +1 -0
  201. package/modern/locales/elGR.js +1 -0
  202. package/modern/locales/esES.js +1 -0
  203. package/modern/locales/faIR.js +1 -0
  204. package/modern/locales/fiFI.js +1 -0
  205. package/modern/locales/frFR.js +1 -0
  206. package/modern/locales/heIL.js +1 -0
  207. package/modern/locales/huHU.js +1 -0
  208. package/modern/locales/index.js +1 -0
  209. package/modern/locales/itIT.js +1 -0
  210. package/modern/locales/jaJP.js +25 -24
  211. package/modern/locales/koKR.js +1 -0
  212. package/modern/locales/nbNO.js +1 -0
  213. package/modern/locales/nlNL.js +1 -0
  214. package/modern/locales/plPL.js +1 -0
  215. package/modern/locales/ptBR.js +1 -0
  216. package/modern/locales/ruRU.js +7 -6
  217. package/modern/locales/skSK.js +1 -0
  218. package/modern/locales/svSE.js +116 -0
  219. package/modern/locales/trTR.js +1 -0
  220. package/modern/locales/ukUA.js +1 -0
  221. package/modern/locales/viVN.js +1 -0
  222. package/modern/locales/zhCN.js +1 -0
  223. package/node/colDef/gridCheckboxSelectionColDef.js +4 -2
  224. package/node/colDef/gridNumericColDef.js +1 -1
  225. package/node/components/cell/GridBooleanCell.js +5 -3
  226. package/node/components/cell/GridEditBooleanCell.js +5 -3
  227. package/node/components/cell/GridEditDateCell.js +5 -3
  228. package/node/components/cell/GridEditInputCell.js +5 -3
  229. package/node/components/cell/GridEditSingleSelectCell.js +10 -7
  230. package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  231. package/node/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  232. package/node/components/columnSelection/GridHeaderCheckbox.js +0 -1
  233. package/node/components/containers/GridRootStyles.js +4 -1
  234. package/node/components/panel/GridColumnsPanel.js +3 -6
  235. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +12 -5
  236. package/node/components/panel/filterPanel/GridFilterPanel.js +2 -5
  237. package/node/components/toolbar/GridToolbarColumnsButton.js +0 -1
  238. package/node/components/toolbar/GridToolbarDensitySelector.js +0 -1
  239. package/node/components/toolbar/GridToolbarExportContainer.js +0 -1
  240. package/node/components/toolbar/GridToolbarFilterButton.js +0 -1
  241. package/node/components/toolbar/GridToolbarQuickFilter.js +61 -4
  242. package/node/constants/defaultGridSlotsComponents.js +2 -1
  243. package/node/constants/localeTextConstants.js +1 -0
  244. package/node/hooks/core/useGridStateInitialization.js +19 -6
  245. package/node/hooks/features/columnMenu/useGridColumnMenu.js +23 -0
  246. package/node/hooks/features/columns/useGridColumnSpanning.js +11 -16
  247. package/node/hooks/features/columns/useGridColumns.js +1 -1
  248. package/node/hooks/features/dimensions/useGridDimensions.js +9 -8
  249. package/node/hooks/features/editRows/useGridEditing.old.js +1 -1
  250. package/node/hooks/features/filter/gridFilterSelector.js +9 -2
  251. package/node/hooks/features/filter/gridFilterUtils.js +9 -8
  252. package/node/hooks/features/filter/useGridFilter.js +24 -7
  253. package/node/hooks/features/pagination/useGridPage.js +1 -1
  254. package/node/hooks/features/pagination/useGridPageSize.js +1 -1
  255. package/node/hooks/features/rows/useGridRows.js +15 -2
  256. package/node/hooks/features/rows/useGridRowsMeta.js +80 -77
  257. package/node/hooks/features/selection/useGridSelection.js +1 -1
  258. package/node/hooks/features/selection/useGridSelectionPreProcessors.js +7 -5
  259. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  260. package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -9
  261. package/node/index.js +1 -1
  262. package/node/locales/arSD.js +1 -0
  263. package/node/locales/bgBG.js +1 -0
  264. package/node/locales/csCZ.js +1 -0
  265. package/node/locales/daDK.js +1 -0
  266. package/node/locales/deDE.js +1 -0
  267. package/node/locales/elGR.js +1 -0
  268. package/node/locales/esES.js +1 -0
  269. package/node/locales/faIR.js +1 -0
  270. package/node/locales/fiFI.js +1 -0
  271. package/node/locales/frFR.js +1 -0
  272. package/node/locales/heIL.js +1 -0
  273. package/node/locales/huHU.js +1 -0
  274. package/node/locales/index.js +13 -0
  275. package/node/locales/itIT.js +1 -0
  276. package/node/locales/jaJP.js +25 -24
  277. package/node/locales/koKR.js +1 -0
  278. package/node/locales/nbNO.js +1 -0
  279. package/node/locales/nlNL.js +1 -0
  280. package/node/locales/plPL.js +1 -0
  281. package/node/locales/ptBR.js +1 -0
  282. package/node/locales/ruRU.js +7 -6
  283. package/node/locales/skSK.js +1 -0
  284. package/node/locales/svSE.js +126 -0
  285. package/node/locales/trTR.js +1 -0
  286. package/node/locales/ukUA.js +1 -0
  287. package/node/locales/viVN.js +1 -0
  288. package/node/locales/zhCN.js +1 -0
  289. package/package.json +4 -3
package/CHANGELOG.md CHANGED
@@ -3,6 +3,157 @@
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
+ ## v5.12.3
7
+
8
+ _Jun 23, 2022_
9
+
10
+ We'd like to offer a big thanks to the 8 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Add Swedish (sv-SE) locale on the data grid and the pickers (#5210) @mrxdst
13
+ - 🌍 Add Dutch (nl-NL) locale on the pickers (#5237) @DDukers
14
+ - 📚 Documentation improvements
15
+ - 🐞 Bugfixes
16
+
17
+ ### `@mui/x-data-grid@v5.12.3` / `@mui/x-data-grid-pro@v5.12.3` / `@mui/x-data-grid-premium@v5.12.3`
18
+
19
+ #### Changes
20
+
21
+ - [DataGrid] Do not hide non-hideable column when pressing Hide All button (#5298) @flaviendelangle
22
+ - [DataGrid] Do not regenerate the row tree when the `loading` prop changes (#5213) @flaviendelangle
23
+ - [DataGrid] Fix the default filter operator fallback on state initialization (#5266) @flaviendelangle
24
+ - [DataGrid] Stop using the deprecated `api` prop in the grid components (#5205) @flaviendelangle
25
+ - [DataGrid] Add Swedish (sv-SE) locale (#5210) @mrxdst
26
+ - [DataGridPremium] Fix detail panel on `DataGridPremium` (#5264) @flaviendelangle
27
+ - [DataGridPremium] Fix Excel import with Remix / Vite (#5207) @alexfauquette
28
+ - [DataGridPremium] Fix error with quick filter and grouping rows (#5238) @alexfauquette
29
+
30
+ ### `@mui/x-date-pickers@v5.0.0-alpha.7` / `@mui/x-date-pickers-pro@v5.0.0-alpha.7`
31
+
32
+ #### Changes
33
+
34
+ - [pickers] Export adapters from both `@mui/x-date-pickers` and `@mui/x-date-pickers-pro` (#5204) @flaviendelangle
35
+ - [pickers] Add Dutch (nl-NL) locale (#5237) @DDukers
36
+
37
+ ### Docs
38
+
39
+ - [docs] Add `DataGridPremium` to all API sections (#5196) @flaviendelangle
40
+ - [docs] Add plan badge next to event name in the Events page (#5200) @flaviendelangle
41
+ - [docs] Add section for theme augmentation in the picker docs (#5276) @flaviendelangle
42
+ - [docs] Add waiting for upvote section for row group panel (#5271) @flaviendelangle
43
+ - [docs] Disable ad on main demo page (#5301) @joserodolfofreitas
44
+ - [docs] Fix typo in the `DateRangePicker` documentation (#5259) @flaviendelangle
45
+
46
+ ### Core
47
+
48
+ - [core] Allow having multiple playgrounds (#5288) @alexfauquette
49
+ - [core] Improve typing of `GridFilterInputMultipleSingleSelect` (#5206) @flaviendelangle
50
+ - [core] Remove arbitrary new lines (#5245) @oliviertassinari
51
+ - [core] Remove dead logic (#5282) @oliviertassinari
52
+ - [test] Fix `inputFormat` when testing with different date adapters (#5291) @cherniavskii
53
+ - [test] Fix date assertion in Safari 13 (#5221) @m4theushw
54
+ - [test] Throw if date adapter is not found (#5289) @cherniavskii
55
+ - [test] Use mock for `ResizeObserver` (#5215) @m4theushw
56
+
57
+ ## v5.12.2
58
+
59
+ _Jun 16, 2022_
60
+
61
+ We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
62
+
63
+ - 🚀 Performance improvement for dynamic row height (#5135) @m4theushw
64
+ - 🕒 Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
65
+ - 📚 Documentation improvements
66
+ - 🐞 Bugfixes
67
+
68
+ ### `@mui/x-data-grid@v5.12.2` / `@mui/x-data-grid-pro@v5.12.2` / `@mui/x-data-grid-premium@v5.12.2`
69
+
70
+ #### Changes
71
+
72
+ - [DataGrid] Fix for cosmetic bug on column filter badge (#5170) @simbahandiane
73
+ - [DataGrid] Hide vertical scrollbar if `autoHeight` is enabled (#5164) @m4theushw
74
+ - [DataGrid] Use exponential search to render non-measured rows (#5135) @m4theushw
75
+ - [DataGridPro] Fix label of the detail panel toggle column (#5191) @m4theushw
76
+ - [DataGridPro] Refresh detail panel caches when props change (#5110) @m4theushw
77
+
78
+ ### Docs
79
+
80
+ - [docs] Add example with custom checkbox column (#5161) @flaviendelangle
81
+ - [docs] Batch small changes (#5177) @oliviertassinari
82
+ - [docs] Fix demo currency format (#5034) @oliviertassinari
83
+ - [docs] Fix outdated license description to match the EULA (#5219) @joserodolfofreitas
84
+ - [docs] Fix redundant headers (#5104) @oliviertassinari
85
+ - [docs] Fix some capitalization to match the guidelines (#5105) @oliviertassinari
86
+ - [docs] Improve the `getRowId` doc section (#5156) @flaviendelangle
87
+ - [docs] Instruction to deal with invalid license message (#5074) @joserodolfofreitas
88
+ - [docs] Use redirection in the code (#5114) @oliviertassinari
89
+ - [docs] Add demo of how to use the data grid with date pickers (#5053) @cherniavskii
90
+
91
+ ### Core
92
+
93
+ - [core] Improve inline code rendering within the details tag (#5166) @Harmouch101
94
+ - [core] Remove unused props from plugin typing (#5185) @flaviendelangle
95
+ - [core] Use the scrollbar size from `useGridDimensions` on `DataGridProColumnHeaders` (#5201) @flaviendelangle
96
+ - [core] Fix `GridColTypeDef` type (#5167) @cherniavskii
97
+ - [core] Fix `GridColTypeDef` usage in demo (#5197) @cherniavskii
98
+ - [test] Add `waitFor` before asserting height (#5203) @m4theushw
99
+
100
+ ## v5.12.1
101
+
102
+ _Jun 9, 2022_
103
+
104
+ We'd like to offer a big thanks to the 10 contributors who made this release possible. Here are some highlights ✨:
105
+
106
+ - 🎁 Add `reason` to `onFilterModelChange` (#4938) @m4theushw
107
+ - 🔎 Control quick filter input value via model prop (#5013) @alexfauquette
108
+ - 📚 Documentation improvements
109
+ - 🐞 Bugfixes
110
+
111
+ ### `@mui/x-data-grid@v5.12.1` / `@mui/x-data-grid-pro@v5.12.1` / `@mui/x-data-grid-premium@v5.12.1`
112
+
113
+ #### Changes
114
+
115
+ - [DataGrid] Add `reason` to `onFilterModelChange` (#4938) @m4theushw
116
+ - [DataGrid] Restore focus after dismissing the column menu (#5027) @m4theushw
117
+ - [DataGrid] Update quick filter input when model is modified (#5013) @alexfauquette
118
+ - [DataGrid] Fix implicit dependency on react-dom (#5121) @oliviertassinari
119
+ - [DataGrid] Support `getRowId` in row reordering (#5093) @flaviendelangle
120
+ - [DataGridPro] Fix column resizing in RTL mode (#4989) @cherniavskii
121
+ - [DataGridPro] Fix column resizing on touchscreen (#5056) @cherniavskii
122
+ - [l10n] Update Japanese (ja-JP) locale (#5122) @hikotq
123
+ - [l10n] Update Russian (ru-RU) locale (#5069) @Artboomy
124
+
125
+ ### `@mui/x-date-pickers@v5.0.0-alpha.6` / `@mui/x-date-pickers-pro@v5.0.0-alpha.6`
126
+
127
+ #### Changes
128
+
129
+ - [pickers] Fix usage of `maxDate` / `minDate` / `disableFuture` and `disablePast` (#5081) @flaviendelangle
130
+ - [pickers] Infer mask from `inputFormat` (#5060) @alexfauquette
131
+ - [pickers] Manage input value without using the focus (#4486) @alexfauquette
132
+ - [pickers] Use new localization for doc examples (#5097) @flaviendelangle
133
+ - [pickers] Fix `shouldDisableDate` in range pickers (#5123) @flaviendelangle
134
+ - [l10n] Add Brazilian Portuguese (pt-BR) locale (#5100) @jardelnovaes
135
+ - [l10n] Use `localText` for remaining texts (#4986) @alexfauquette
136
+
137
+ ### Docs
138
+
139
+ - [docs] Implement the focus management on data grid demo links (#5070) @alexfauquette
140
+ - [docs] Fix `301` link to render cell (#5106) @oliviertassinari
141
+ - [docs] Fix broken anchor link @oliviertassinari
142
+ - [docs] Improve movie dataset (#5142) @flaviendelangle
143
+ - [docs] Move all localization documentation in a unique page (#5072) @alexfauquette
144
+ - [docs] Section for overwriting core components i18n keys (#4998) @DanailH
145
+ - [docs] Small grammar and format fixes for Dynamic Row Height section (#5098) @samuelsycamore
146
+
147
+ ### Core
148
+
149
+ - [core] Allows to run tests with different date adapters (#5055) @alexfauquette
150
+ - [core] Prettify the l10n issue (#4928) @alexfauquette
151
+ - [core] Set correct `apiRef` type in row reorder pre processors #5125 @DanailH
152
+ - [core] Stop using `GridEvents` in technical doc (#5157) @flaviendelangle
153
+ - [core] Upgrade monorepo (#5101) @oliviertassinari
154
+ - [test] Fix dynamic row height test failing on Chrome (#5147) @m4theushw
155
+ - [test] Remove delay on server demo for regression tests (#5131) @alexfauquette
156
+
6
157
  ## v5.12.0
7
158
 
8
159
  _May 31, 2022_
@@ -21,6 +172,8 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
21
172
 
22
173
  ### `@mui/x-data-grid@v5.12.0` / `@mui/x-data-grid-pro@v5.12.0` / `@mui/x-data-grid-premium@v5.12.0`
23
174
 
175
+ #### Changes
176
+
24
177
  - [DataGrid] Support dynamic row height (#4859) @m4theushw
25
178
  - [DataGrid] Add `onMenuOpen` and `onMenuClose` props (#4825) @DanailH
26
179
  - [DataGrid] Add generics to `GridActionsColDef` to match `GridColDef` (#4982) @subvertallchris
@@ -36,7 +189,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
36
189
  - [l10n] Add Norwegian (Bokmål) (nb-NO) locale (#5001) @spiftire
37
190
  - [l10n] Add Turkish (tr-TR) locale (#5026) @Rassilion
38
191
 
39
- ### `@mui/x-date-pickers@5.0.0-alpha.5` / `@mui/x-date-pickers-pro@5.0.0-alpha.5`
192
+ ### `@mui/x-date-pickers@v5.0.0-alpha.5` / `@mui/x-date-pickers-pro@v5.0.0-alpha.5`
40
193
 
41
194
  #### Breaking changes
42
195
 
@@ -109,7 +262,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
109
262
  - [DataGridPremium] Support column spanning in the Excel export (#4830) @cherniavskii
110
263
  - [l10n] Improve Russian (ru-RU) locale (#4864) @arvkonstantin
111
264
 
112
- ### `@mui/x-date-pickers@5.0.0-alpha.4` / `@mui/x-date-pickers-pro@5.0.0-alpha.4`
265
+ ### `@mui/x-date-pickers@v5.0.0-alpha.4` / `@mui/x-date-pickers-pro@v5.0.0-alpha.4`
113
266
 
114
267
  #### Breaking changes
115
268
 
@@ -234,7 +387,7 @@ We'd like to offer a big thanks to the 15 contributors who made this release pos
234
387
  - [l10n] Improve German (de-DE) locale (#4748) @sebastianfrey
235
388
  - [l10n] Improve German (de-DE) locale (#4668) @izu-co
236
389
 
237
- ### `@mui/x-date-pickers@5.0.0-alpha.3` / `@mui/x-date-pickers-pro@5.0.0-alpha.3`
390
+ ### `@mui/x-date-pickers@v5.0.0-alpha.3` / `@mui/x-date-pickers-pro@v5.0.0-alpha.3`
238
391
 
239
392
  #### Breaking changes
240
393
 
@@ -335,7 +488,7 @@ We'd like to offer a big thanks to the 6 contributors who made this release poss
335
488
  - [DataGrid] Don't close column menu when updating rows (#4498) @m4theushw
336
489
  - [DataGridPro] Introduce row reorder (#4034) @DanailH
337
490
 
338
- ### `@mui/x-date-pickers@5.0.0-alpha.2` / `@mui/x-date-pickers-pro@5.0.0-alpha.2`
491
+ ### `@mui/x-date-pickers@v5.0.0-alpha.2` / `@mui/x-date-pickers-pro@v5.0.0-alpha.2`
339
492
 
340
493
  - [pickers] Pass `PaperProps` to `DesktopWrapper` component (#4584) @alexfauquette
341
494
  - [TimePicker] Fix bug when time picker clear value (#4582) @alexfauquette
@@ -396,7 +549,7 @@ We'd like to offer a big thanks to the 9 contributors who made this release poss
396
549
  - [DataGridPro] Fix toggling detail panel using keyboard (#4409) @cherniavskii
397
550
  - [l10n] Add Hungarian (hu-HU) locale (#4458) @x22tri
398
551
 
399
- ### `@mui/x-date-pickers@5.0.0-alpha.1` / `@mui/x-date-pickers-pro@5.0.0-alpha.1`
552
+ ### `@mui/x-date-pickers@v5.0.0-alpha.1` / `@mui/x-date-pickers-pro@v5.0.0-alpha.1`
400
553
 
401
554
  - [ClockPicker] Should call `shouldDisableTime` with the hours with meridiem (#4404) @flaviendelangle
402
555
  - [MonthPicker] Clicking on a `PickersMonth` button should not trigger the form submit (#4402) @flaviendelangle
@@ -4025,9 +4178,9 @@ Big thanks to the 8 contributors who made this release possible. Here are some h
4025
4178
 
4026
4179
  ### Docs
4027
4180
 
4028
- - [docs] Data Grid depends on side effects (#666) @oliviertassinari
4181
+ - [docs] Data grid depends on side effects (#666) @oliviertassinari
4029
4182
  - [docs] Clarify the purpose of x-grid-data-generator (#634) @Elius94
4030
- - [docs] Data Grid is in the lab (#612) @oliviertassinari
4183
+ - [docs] Data grid is in the lab (#612) @oliviertassinari
4031
4184
  - [docs] Fix Demo app, downgrade webpack-cli, known issue in latest version (#647) @dtassone
4032
4185
  - [docs] Fix typo in columns.md @stojy
4033
4186
  - [docs] Reduce confusion on /export page (#646) @SerdarMustafa1
@@ -1,2 +1,3 @@
1
1
  import { GridColDef } from '../models/colDef/gridColDef';
2
+ export declare const GRID_CHECKBOX_SELECTION_FIELD = "__check__";
2
3
  export declare const GRID_CHECKBOX_SELECTION_COL_DEF: GridColDef;
@@ -5,8 +5,9 @@ import { GridHeaderCheckbox } from '../components/columnSelection/GridHeaderChec
5
5
  import { selectedIdsLookupSelector } from '../hooks/features/selection/gridSelectionSelector';
6
6
  import { GRID_BOOLEAN_COL_DEF } from './gridBooleanColDef';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const GRID_CHECKBOX_SELECTION_FIELD = '__check__';
8
9
  export const GRID_CHECKBOX_SELECTION_COL_DEF = _extends({}, GRID_BOOLEAN_COL_DEF, {
9
- field: '__check__',
10
+ field: GRID_CHECKBOX_SELECTION_FIELD,
10
11
  type: 'checkboxSelection',
11
12
  width: 50,
12
13
  resizable: false,
@@ -1,2 +1,2 @@
1
1
  import { GridFilterOperator } from '../models/gridFilterOperator';
2
- export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string | number | Date, any>[];
2
+ export declare const getGridDateOperators: (showTime?: boolean | undefined) => GridFilterOperator<any, string | Date, any>[];
@@ -11,7 +11,7 @@ export const GRID_NUMERIC_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
11
11
  valueParser: value => value === '' ? null : Number(value),
12
12
  valueFormatter: ({
13
13
  value
14
- }) => value && isNumber(value) && value.toLocaleString() || value,
14
+ }) => isNumber(value) ? value.toLocaleString() : value || '',
15
15
  filterOperators: getGridNumericOperators(),
16
16
  getApplyQuickFilterFn: getGridNumericQuickFilterFn
17
17
  });
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import { unstable_composeClasses as composeClasses } from '@mui/material';
6
6
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
7
7
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
8
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
 
10
11
  const useUtilityClasses = ownerState => {
@@ -19,11 +20,11 @@ const useUtilityClasses = ownerState => {
19
20
 
20
21
  export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
21
22
  const {
22
- value,
23
- api
23
+ value
24
24
  } = props,
25
25
  other = _objectWithoutPropertiesLoose(props, _excluded);
26
26
 
27
+ const apiRef = useGridApiContext();
27
28
  const rootProps = useGridRootProps();
28
29
  const ownerState = {
29
30
  classes: rootProps.classes
@@ -33,7 +34,7 @@ export const GridBooleanCell = /*#__PURE__*/React.memo(props => {
33
34
  return /*#__PURE__*/_jsx(Icon, _extends({
34
35
  fontSize: "small",
35
36
  className: classes.root,
36
- titleAccess: api.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
37
+ titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
37
38
  "data-value": Boolean(value)
38
39
  }, other));
39
40
  });
@@ -8,6 +8,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
8
8
  import { unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
9
9
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
10
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
11
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
 
13
14
  const useUtilityClasses = ownerState => {
@@ -26,7 +27,6 @@ function GridEditBooleanCell(props) {
26
27
  const {
27
28
  id: idProp,
28
29
  value,
29
- api,
30
30
  field,
31
31
  className,
32
32
  hasFocus,
@@ -34,6 +34,7 @@ function GridEditBooleanCell(props) {
34
34
  } = props,
35
35
  other = _objectWithoutPropertiesLoose(props, _excluded);
36
36
 
37
+ const apiRef = useGridApiContext();
37
38
  const inputRef = React.useRef(null);
38
39
  const id = useId();
39
40
  const [valueState, setValueState] = React.useState(value);
@@ -50,12 +51,12 @@ function GridEditBooleanCell(props) {
50
51
  }
51
52
 
52
53
  setValueState(newValue);
53
- await api.setEditCellValue({
54
+ await apiRef.current.setEditCellValue({
54
55
  id: idProp,
55
56
  field,
56
57
  value: newValue
57
58
  }, event);
58
- }, [api, field, idProp, onValueChange]);
59
+ }, [apiRef, field, idProp, onValueChange]);
59
60
  React.useEffect(() => {
60
61
  setValueState(value);
61
62
  }, [value]);
@@ -8,6 +8,7 @@ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/u
8
8
  import InputBase from '@mui/material/InputBase';
9
9
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
10
10
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
11
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
11
12
  import { jsx as _jsx } from "react/jsx-runtime";
12
13
 
13
14
  const useUtilityClasses = ownerState => {
@@ -24,7 +25,6 @@ function GridEditDateCell(props) {
24
25
  const {
25
26
  id,
26
27
  value: valueProp,
27
- api,
28
28
  field,
29
29
  colDef,
30
30
  hasFocus,
@@ -34,6 +34,7 @@ function GridEditDateCell(props) {
34
34
  other = _objectWithoutPropertiesLoose(props, _excluded);
35
35
 
36
36
  const isDateTime = colDef.type === 'dateTime';
37
+ const apiRef = useGridApiContext();
37
38
  const inputRef = React.useRef();
38
39
  const valueTransformed = React.useMemo(() => {
39
40
  let parsedDate;
@@ -93,12 +94,12 @@ function GridEditDateCell(props) {
93
94
  parsed: newParsedDate,
94
95
  formatted: newFormattedDate
95
96
  });
96
- api.setEditCellValue({
97
+ apiRef.current.setEditCellValue({
97
98
  id,
98
99
  field,
99
100
  value: newParsedDate
100
101
  }, event);
101
- }, [api, field, id, onValueChange]);
102
+ }, [apiRef, field, id, onValueChange]);
102
103
  React.useEffect(() => {
103
104
  setValueState(state => {
104
105
  var _valueTransformed$par, _state$parsed;
@@ -11,6 +11,7 @@ import { getDataGridUtilityClass } from '../../constants/gridClasses';
11
11
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
12
12
  import { GridLoadIcon } from '../icons/index';
13
13
  import { SUBMIT_FILTER_STROKE_TIME } from '../panel/filterPanel/GridFilterInputValue';
14
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
 
16
17
  const useUtilityClasses = ownerState => {
@@ -45,7 +46,6 @@ function GridEditInputCell(props) {
45
46
  const {
46
47
  id,
47
48
  value,
48
- api,
49
49
  field,
50
50
  colDef,
51
51
  hasFocus,
@@ -55,6 +55,7 @@ function GridEditInputCell(props) {
55
55
  } = props,
56
56
  other = _objectWithoutPropertiesLoose(props, _excluded);
57
57
 
58
+ const apiRef = useGridApiContext();
58
59
  const inputRef = React.useRef();
59
60
  const [valueState, setValueState] = React.useState(value);
60
61
  const ownerState = {
@@ -69,13 +70,13 @@ function GridEditInputCell(props) {
69
70
  }
70
71
 
71
72
  setValueState(newValue);
72
- api.setEditCellValue({
73
+ apiRef.current.setEditCellValue({
73
74
  id,
74
75
  field,
75
76
  value: newValue,
76
77
  debounceMs
77
78
  }, event);
78
- }, [api, debounceMs, field, id, onValueChange]);
79
+ }, [apiRef, debounceMs, field, id, onValueChange]);
79
80
  React.useEffect(() => {
80
81
  setValueState(value);
81
82
  }, [value]);
@@ -9,6 +9,7 @@ import { isEscapeKey } from '../../utils/keyboardUtils';
9
9
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
10
10
  import { GridEditModes } from '../../models/gridEditRowModel';
11
11
  import { getValueFromValueOptions } from '../panel/filterPanel/filterPanelUtils';
12
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
12
13
  import { jsx as _jsx } from "react/jsx-runtime";
13
14
 
14
15
  const renderSingleSelectOptions = (option, OptionComponent) => {
@@ -38,6 +39,7 @@ function GridEditSingleSelectCell(props) {
38
39
  } = props,
39
40
  other = _objectWithoutPropertiesLoose(props, _excluded);
40
41
 
42
+ const apiRef = useGridApiContext();
41
43
  const ref = React.useRef();
42
44
  const inputRef = React.useRef();
43
45
  const rootProps = useGridRootProps();
@@ -86,7 +88,7 @@ function GridEditSingleSelectCell(props) {
86
88
  await onValueChange(event, formattedTargetValue);
87
89
  }
88
90
 
89
- const isValid = await api.setEditCellValue({
91
+ const isValid = await apiRef.current.setEditCellValue({
90
92
  id,
91
93
  field,
92
94
  value: formattedTargetValue
@@ -101,18 +103,18 @@ function GridEditSingleSelectCell(props) {
101
103
  return;
102
104
  }
103
105
 
104
- const canCommit = await Promise.resolve(api.commitCellChange({
106
+ const canCommit = await Promise.resolve(apiRef.current.commitCellChange({
105
107
  id,
106
108
  field
107
109
  }, event));
108
110
 
109
111
  if (canCommit) {
110
- api.setCellMode(id, field, 'view');
112
+ apiRef.current.setCellMode(id, field, 'view');
111
113
 
112
114
  if (event.key) {
113
115
  // TODO v6: remove once we stop ignoring events fired from portals
114
- const params = api.getCellParams(id, field);
115
- api.publishEvent('cellNavigationKeyDown', params, event);
116
+ const params = apiRef.current.getCellParams(id, field);
117
+ apiRef.current.publishEvent('cellNavigationKeyDown', params, event);
116
118
  }
117
119
  }
118
120
  };
@@ -127,13 +129,13 @@ function GridEditSingleSelectCell(props) {
127
129
  var _rootProps$experiment2;
128
130
 
129
131
  if ((_rootProps$experiment2 = rootProps.experimentalFeatures) != null && _rootProps$experiment2.newEditingApi) {
130
- api.stopCellEditMode({
132
+ apiRef.current.stopCellEditMode({
131
133
  id,
132
134
  field,
133
135
  ignoreModifications: true
134
136
  });
135
137
  } else {
136
- api.setCellMode(id, field, 'view');
138
+ apiRef.current.setCellMode(id, field, 'view');
137
139
  }
138
140
  }
139
141
  };
@@ -167,6 +167,7 @@ function GridColumnHeaderItem(props) {
167
167
  field: column.field,
168
168
  colDef: column
169
169
  }) : column.headerClassName;
170
+ const label = (_column$headerName = column.headerName) != null ? _column$headerName : column.field;
170
171
  return /*#__PURE__*/_jsxs("div", _extends({
171
172
  ref: headerCellRef,
172
173
  className: clsx(classes.root, headerClassName),
@@ -179,7 +180,8 @@ function GridColumnHeaderItem(props) {
179
180
  role: "columnheader",
180
181
  tabIndex: tabIndex,
181
182
  "aria-colindex": colIndex + 1,
182
- "aria-sort": ariaSort
183
+ "aria-sort": ariaSort,
184
+ "aria-label": column.renderHeader && headerComponent == null ? label : undefined
183
185
  }, mouseEventsHandlers, {
184
186
  children: [/*#__PURE__*/_jsxs("div", _extends({
185
187
  className: classes.draggableContainer,
@@ -189,8 +191,8 @@ function GridColumnHeaderItem(props) {
189
191
  className: classes.titleContainer,
190
192
  children: [/*#__PURE__*/_jsx("div", {
191
193
  className: classes.titleContainerContent,
192
- children: headerComponent || /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
193
- label: (_column$headerName = column.headerName) != null ? _column$headerName : column.field,
194
+ children: column.renderHeader ? headerComponent : /*#__PURE__*/_jsx(GridColumnHeaderTitle, {
195
+ label: label,
194
196
  description: column.description,
195
197
  columnWidth: width
196
198
  })
@@ -85,7 +85,6 @@ const GridCellCheckboxForwardRef = /*#__PURE__*/React.forwardRef(function GridCe
85
85
  checked: isChecked,
86
86
  onChange: handleChange,
87
87
  className: classes.root,
88
- color: "primary",
89
88
  inputProps: {
90
89
  'aria-label': label
91
90
  },
@@ -111,7 +111,6 @@ const GridHeaderCheckbox = /*#__PURE__*/React.forwardRef(function GridHeaderChec
111
111
  checked: isChecked,
112
112
  onChange: handleChange,
113
113
  className: classes.root,
114
- color: "primary",
115
114
  inputProps: {
116
115
  'aria-label': label
117
116
  },
@@ -165,7 +165,7 @@ export const GridRootStyles = styled('div', {
165
165
  minWidth: 0,
166
166
  flex: 1,
167
167
  whiteSpace: 'nowrap',
168
- overflow: 'hidden'
168
+ overflowX: 'hidden'
169
169
  },
170
170
  [`& .${gridClasses.columnHeaderTitleContainerContent}`]: {
171
171
  overflow: 'hidden',
@@ -221,6 +221,9 @@ export const GridRootStyles = styled('div', {
221
221
  },
222
222
  [`&.${gridClasses['columnSeparator--resizing']}`]: {
223
223
  color: theme.palette.text.primary
224
+ },
225
+ '& svg': {
226
+ pointerEvents: 'none'
224
227
  }
225
228
  },
226
229
  [`& .${gridClasses.iconSeparator}`]: {
@@ -81,7 +81,7 @@ export function GridColumnsPanel(props) {
81
81
  return apiRef.current.setColumnVisibilityModel({});
82
82
  }
83
83
 
84
- return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.map(col => [col.field, false])));
84
+ return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.filter(col => col.hideable !== false).map(col => [col.field, false])));
85
85
  } // TODO v6: Remove
86
86
 
87
87
 
@@ -135,7 +135,6 @@ export function GridColumnsPanel(props) {
135
135
  checked: columnVisibilityModel[column.field] !== false,
136
136
  onClick: toggleColumn,
137
137
  name: column.field,
138
- color: "primary",
139
138
  size: "small"
140
139
  }, (_rootProps$components2 = rootProps.componentsProps) == null ? void 0 : _rootProps$components2.baseSwitch)),
141
140
  label: column.headerName || column.field
@@ -152,13 +151,11 @@ export function GridColumnsPanel(props) {
152
151
  })
153
152
  }), /*#__PURE__*/_jsxs(GridPanelFooter, {
154
153
  children: [/*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
155
- onClick: () => toggleAllColumns(false),
156
- color: "primary"
154
+ onClick: () => toggleAllColumns(false)
157
155
  }, (_rootProps$components3 = rootProps.componentsProps) == null ? void 0 : _rootProps$components3.baseButton, {
158
156
  children: apiRef.current.getLocaleText('columnsPanelHideAllButton')
159
157
  })), /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
160
- onClick: () => toggleAllColumns(true),
161
- color: "primary"
158
+ onClick: () => toggleAllColumns(true)
162
159
  }, (_rootProps$components4 = rootProps.componentsProps) == null ? void 0 : _rootProps$components4.baseButton, {
163
160
  children: apiRef.current.getLocaleText('columnsPanelShowAllButton')
164
161
  }))]
@@ -2,13 +2,14 @@ import * as React from 'react';
2
2
  import { AutocompleteProps } from '@mui/material/Autocomplete';
3
3
  import { GridFilterItem } from '../../../models/gridFilterItem';
4
4
  import type { GridApiCommon } from '../../../models/api/gridApiCommon';
5
- export declare type GridFilterInputMultipleSingleSelectProps = {
5
+ import type { ValueOptions } from '../../../models/colDef/gridColDef';
6
+ export interface GridFilterInputMultipleSingleSelectProps extends Omit<AutocompleteProps<ValueOptions, true, false, true>, 'options' | 'renderInput' | 'onChange' | 'value' | 'id' | 'filterOptions' | 'isOptionEqualToValue' | 'limitTags' | 'multiple'> {
6
7
  item: GridFilterItem;
7
8
  applyValue: (value: GridFilterItem) => void;
8
9
  apiRef: React.MutableRefObject<GridApiCommon>;
9
10
  focusElementRef?: React.Ref<any>;
10
11
  type?: 'singleSelect';
11
- } & Omit<AutocompleteProps<any[], true, false, true>, 'options' | 'renderInput'>;
12
+ }
12
13
  declare function GridFilterInputMultipleSingleSelect(props: GridFilterInputMultipleSingleSelectProps): JSX.Element;
13
14
  declare namespace GridFilterInputMultipleSingleSelect {
14
15
  var propTypes: any;
@@ -26,9 +26,17 @@ function GridFilterInputMultipleSingleSelect(props) {
26
26
  const id = useId();
27
27
  const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
28
28
  const resolvedValueOptions = React.useMemo(() => {
29
- return typeof (resolvedColumn == null ? void 0 : resolvedColumn.valueOptions) === 'function' ? resolvedColumn.valueOptions({
30
- field: resolvedColumn.field
31
- }) : resolvedColumn == null ? void 0 : resolvedColumn.valueOptions;
29
+ if (!(resolvedColumn != null && resolvedColumn.valueOptions)) {
30
+ return [];
31
+ }
32
+
33
+ if (typeof resolvedColumn.valueOptions === 'function') {
34
+ return resolvedColumn.valueOptions({
35
+ field: resolvedColumn.field
36
+ });
37
+ }
38
+
39
+ return resolvedColumn.valueOptions;
32
40
  }, [resolvedColumn]);
33
41
  const resolvedFormattedValueOptions = React.useMemo(() => {
34
42
  return resolvedValueOptions == null ? void 0 : resolvedValueOptions.map(getValueFromOption);
@@ -85,8 +93,7 @@ function GridFilterInputMultipleSingleSelect(props) {
85
93
  return /*#__PURE__*/_jsx(Autocomplete, _extends({
86
94
  multiple: true,
87
95
  limitTags: 1,
88
- options: resolvedValueOptions // TODO: avoid `any`?
89
- ,
96
+ options: resolvedValueOptions,
90
97
  isOptionEqualToValue: isOptionEqualToValue,
91
98
  filterOptions: filter,
92
99
  id: id,
@@ -72,9 +72,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
72
72
  return;
73
73
  }
74
74
 
75
- apiRef.current.setFilterModel(_extends({}, filterModel, {
76
- items: [...items, defaultItem]
77
- }));
75
+ apiRef.current.upsertFilterItems([...items, defaultItem]);
78
76
  };
79
77
 
80
78
  const deleteFilter = React.useCallback(item => {
@@ -115,8 +113,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
115
113
  }), !rootProps.disableMultipleColumnsFiltering && /*#__PURE__*/_jsx(GridPanelFooter, {
116
114
  children: /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
117
115
  onClick: addNewFilter,
118
- startIcon: /*#__PURE__*/_jsx(GridAddIcon, {}),
119
- color: "primary"
116
+ startIcon: /*#__PURE__*/_jsx(GridAddIcon, {})
120
117
  }, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseButton, {
121
118
  children: apiRef.current.getLocaleText('filterPanelAddFilter')
122
119
  }))
@@ -41,7 +41,6 @@ export const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function G
41
41
  return /*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
42
42
  ref: ref,
43
43
  size: "small",
44
- color: "primary",
45
44
  "aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
46
45
  startIcon: /*#__PURE__*/_jsx(rootProps.components.ColumnSelectorIcon, {})
47
46
  }, other, {
@@ -95,7 +95,6 @@ export const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function
95
95
  return /*#__PURE__*/_jsxs(React.Fragment, {
96
96
  children: [/*#__PURE__*/_jsx(rootProps.components.BaseButton, _extends({
97
97
  ref: handleRef,
98
- color: "primary",
99
98
  size: "small",
100
99
  startIcon: startIcon,
101
100
  "aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),