@mui/x-data-grid 5.12.1 → 5.13.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 (315) hide show
  1. package/CHANGELOG.md +155 -8
  2. package/DataGrid/DataGrid.js +4 -4
  3. package/colDef/gridCheckboxSelectionColDef.d.ts +1 -0
  4. package/colDef/gridCheckboxSelectionColDef.js +2 -1
  5. package/colDef/gridDateOperators.d.ts +1 -1
  6. package/colDef/gridNumericColDef.js +1 -1
  7. package/colDef/gridStringOperators.d.ts +1 -1
  8. package/colDef/gridStringOperators.js +11 -6
  9. package/components/GridRow.js +1 -1
  10. package/components/cell/GridActionsCellItem.d.ts +2 -2
  11. package/components/cell/GridBooleanCell.js +4 -3
  12. package/components/cell/GridEditBooleanCell.js +4 -3
  13. package/components/cell/GridEditDateCell.js +4 -3
  14. package/components/cell/GridEditInputCell.js +4 -3
  15. package/components/cell/GridEditSingleSelectCell.js +9 -7
  16. package/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  17. package/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  18. package/components/columnSelection/GridHeaderCheckbox.js +0 -1
  19. package/components/containers/GridRootStyles.js +1 -1
  20. package/components/panel/GridColumnsPanel.js +3 -6
  21. package/components/panel/GridPanel.d.ts +1 -1
  22. package/components/panel/filterPanel/GridFilterForm.js +11 -4
  23. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  24. package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  25. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +5 -9
  26. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +42 -19
  27. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
  28. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
  29. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  30. package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  31. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
  32. package/components/panel/filterPanel/GridFilterPanel.js +1 -2
  33. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  34. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  35. package/components/toolbar/GridToolbarColumnsButton.js +0 -1
  36. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  37. package/components/toolbar/GridToolbarDensitySelector.js +0 -1
  38. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  39. package/components/toolbar/GridToolbarExportContainer.js +0 -1
  40. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  41. package/components/toolbar/GridToolbarFilterButton.js +0 -1
  42. package/constants/localeTextConstants.js +1 -0
  43. package/hooks/features/columns/useGridColumnSpanning.d.ts +1 -1
  44. package/hooks/features/columns/useGridColumnSpanning.js +1 -1
  45. package/hooks/features/columns/useGridColumns.d.ts +1 -1
  46. package/hooks/features/dimensions/gridDimensionsApi.d.ts +5 -0
  47. package/hooks/features/dimensions/useGridDimensions.js +37 -23
  48. package/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  49. package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  50. package/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  51. package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  52. package/hooks/features/filter/gridFilterState.d.ts +1 -1
  53. package/hooks/features/filter/gridFilterUtils.js +8 -5
  54. package/hooks/features/filter/useGridFilter.d.ts +1 -1
  55. package/hooks/features/rows/useGridRows.js +16 -3
  56. package/hooks/features/rows/useGridRowsMeta.js +79 -77
  57. package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  58. package/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  59. package/hooks/features/sorting/useGridSorting.d.ts +1 -1
  60. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -1
  61. package/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  62. package/hooks/utils/useGridApiContext.js +1 -1
  63. package/hooks/utils/useGridRootProps.js +1 -1
  64. package/index.js +1 -1
  65. package/legacy/DataGrid/DataGrid.js +4 -4
  66. package/legacy/colDef/gridCheckboxSelectionColDef.js +2 -1
  67. package/legacy/colDef/gridNumericColDef.js +1 -1
  68. package/legacy/colDef/gridStringOperators.js +13 -5
  69. package/legacy/components/GridRow.js +1 -1
  70. package/legacy/components/cell/GridBooleanCell.js +3 -1
  71. package/legacy/components/cell/GridEditBooleanCell.js +4 -2
  72. package/legacy/components/cell/GridEditDateCell.js +4 -2
  73. package/legacy/components/cell/GridEditInputCell.js +4 -2
  74. package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
  75. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  76. package/legacy/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  77. package/legacy/components/columnSelection/GridHeaderCheckbox.js +0 -1
  78. package/legacy/components/containers/GridRootStyles.js +1 -1
  79. package/legacy/components/panel/GridColumnsPanel.js +5 -6
  80. package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
  81. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  82. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  83. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +34 -12
  84. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
  85. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  86. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  87. package/legacy/components/panel/filterPanel/GridFilterPanel.js +1 -2
  88. package/legacy/components/toolbar/GridToolbarColumnsButton.js +0 -1
  89. package/legacy/components/toolbar/GridToolbarDensitySelector.js +0 -1
  90. package/legacy/components/toolbar/GridToolbarExportContainer.js +0 -1
  91. package/legacy/components/toolbar/GridToolbarFilterButton.js +0 -1
  92. package/legacy/constants/localeTextConstants.js +1 -0
  93. package/legacy/hooks/features/columns/useGridColumnSpanning.js +1 -1
  94. package/legacy/hooks/features/dimensions/useGridDimensions.js +36 -23
  95. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  96. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
  97. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  98. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
  99. package/legacy/hooks/features/filter/gridFilterUtils.js +8 -5
  100. package/legacy/hooks/features/rows/useGridRows.js +18 -3
  101. package/legacy/hooks/features/rows/useGridRowsMeta.js +81 -77
  102. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  103. package/legacy/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  104. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  105. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  106. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  107. package/legacy/index.js +1 -1
  108. package/legacy/locales/arSD.js +1 -0
  109. package/legacy/locales/bgBG.js +1 -0
  110. package/legacy/locales/csCZ.js +1 -0
  111. package/legacy/locales/daDK.js +1 -0
  112. package/legacy/locales/deDE.js +1 -0
  113. package/legacy/locales/elGR.js +1 -0
  114. package/legacy/locales/esES.js +1 -0
  115. package/legacy/locales/faIR.js +1 -0
  116. package/legacy/locales/fiFI.js +1 -0
  117. package/legacy/locales/frFR.js +1 -0
  118. package/legacy/locales/heIL.js +1 -0
  119. package/legacy/locales/huHU.js +1 -0
  120. package/legacy/locales/index.js +3 -0
  121. package/legacy/locales/itIT.js +1 -0
  122. package/legacy/locales/jaJP.js +1 -0
  123. package/legacy/locales/koKR.js +1 -0
  124. package/legacy/locales/nbNO.js +1 -0
  125. package/legacy/locales/nlNL.js +1 -0
  126. package/legacy/locales/plPL.js +1 -0
  127. package/legacy/locales/ptBR.js +1 -0
  128. package/legacy/locales/roRO.js +128 -0
  129. package/legacy/locales/ruRU.js +1 -0
  130. package/legacy/locales/skSK.js +16 -15
  131. package/legacy/locales/svSE.js +128 -0
  132. package/legacy/locales/trTR.js +1 -0
  133. package/legacy/locales/ukUA.js +1 -0
  134. package/legacy/locales/viVN.js +1 -0
  135. package/legacy/locales/zhCN.js +1 -0
  136. package/legacy/utils/keyboardUtils.js +4 -3
  137. package/locales/arSD.js +1 -0
  138. package/locales/bgBG.js +1 -0
  139. package/locales/csCZ.js +1 -0
  140. package/locales/daDK.js +1 -0
  141. package/locales/deDE.js +1 -0
  142. package/locales/elGR.js +1 -0
  143. package/locales/esES.js +1 -0
  144. package/locales/faIR.js +1 -0
  145. package/locales/fiFI.js +1 -0
  146. package/locales/frFR.js +1 -0
  147. package/locales/heIL.js +1 -0
  148. package/locales/huHU.js +1 -0
  149. package/locales/index.d.ts +3 -0
  150. package/locales/index.js +3 -0
  151. package/locales/itIT.js +1 -0
  152. package/locales/jaJP.js +1 -0
  153. package/locales/koKR.js +1 -0
  154. package/locales/nbNO.js +1 -0
  155. package/locales/nlNL.js +1 -0
  156. package/locales/plPL.js +1 -0
  157. package/locales/ptBR.js +1 -0
  158. package/locales/roRO.d.ts +2 -0
  159. package/locales/roRO.js +116 -0
  160. package/locales/ruRU.js +1 -0
  161. package/locales/skSK.js +16 -15
  162. package/locales/svSE.d.ts +2 -0
  163. package/locales/svSE.js +116 -0
  164. package/locales/trTR.js +1 -0
  165. package/locales/ukUA.js +1 -0
  166. package/locales/viVN.js +1 -0
  167. package/locales/zhCN.js +1 -0
  168. package/models/api/gridLocaleTextApi.d.ts +1 -0
  169. package/models/colDef/gridColDef.d.ts +1 -1
  170. package/modern/DataGrid/DataGrid.js +4 -4
  171. package/modern/colDef/gridCheckboxSelectionColDef.js +2 -1
  172. package/modern/colDef/gridNumericColDef.js +1 -1
  173. package/modern/colDef/gridStringOperators.js +11 -6
  174. package/modern/components/GridRow.js +1 -1
  175. package/modern/components/cell/GridBooleanCell.js +4 -3
  176. package/modern/components/cell/GridEditBooleanCell.js +4 -3
  177. package/modern/components/cell/GridEditDateCell.js +4 -3
  178. package/modern/components/cell/GridEditInputCell.js +4 -3
  179. package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
  180. package/modern/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  181. package/modern/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  182. package/modern/components/columnSelection/GridHeaderCheckbox.js +0 -1
  183. package/modern/components/containers/GridRootStyles.js +1 -1
  184. package/modern/components/panel/GridColumnsPanel.js +3 -6
  185. package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
  186. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  187. package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  188. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -13
  189. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
  190. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  191. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  192. package/modern/components/panel/filterPanel/GridFilterPanel.js +1 -2
  193. package/modern/components/toolbar/GridToolbarColumnsButton.js +0 -1
  194. package/modern/components/toolbar/GridToolbarDensitySelector.js +0 -1
  195. package/modern/components/toolbar/GridToolbarExportContainer.js +0 -1
  196. package/modern/components/toolbar/GridToolbarFilterButton.js +0 -1
  197. package/modern/constants/localeTextConstants.js +1 -0
  198. package/modern/hooks/features/columns/useGridColumnSpanning.js +1 -1
  199. package/modern/hooks/features/dimensions/useGridDimensions.js +37 -23
  200. package/modern/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  201. package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  202. package/modern/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  203. package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  204. package/modern/hooks/features/filter/gridFilterUtils.js +8 -5
  205. package/modern/hooks/features/rows/useGridRows.js +16 -3
  206. package/modern/hooks/features/rows/useGridRowsMeta.js +77 -75
  207. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  208. package/modern/hooks/features/selection/useGridSelectionPreProcessors.js +8 -6
  209. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -8
  210. package/modern/hooks/utils/useGridApiContext.js +1 -1
  211. package/modern/hooks/utils/useGridRootProps.js +1 -1
  212. package/modern/index.js +1 -1
  213. package/modern/locales/arSD.js +1 -0
  214. package/modern/locales/bgBG.js +1 -0
  215. package/modern/locales/csCZ.js +1 -0
  216. package/modern/locales/daDK.js +1 -0
  217. package/modern/locales/deDE.js +1 -0
  218. package/modern/locales/elGR.js +1 -0
  219. package/modern/locales/esES.js +1 -0
  220. package/modern/locales/faIR.js +1 -0
  221. package/modern/locales/fiFI.js +1 -0
  222. package/modern/locales/frFR.js +1 -0
  223. package/modern/locales/heIL.js +1 -0
  224. package/modern/locales/huHU.js +1 -0
  225. package/modern/locales/index.js +3 -0
  226. package/modern/locales/itIT.js +1 -0
  227. package/modern/locales/jaJP.js +1 -0
  228. package/modern/locales/koKR.js +1 -0
  229. package/modern/locales/nbNO.js +1 -0
  230. package/modern/locales/nlNL.js +1 -0
  231. package/modern/locales/plPL.js +1 -0
  232. package/modern/locales/ptBR.js +1 -0
  233. package/modern/locales/roRO.js +116 -0
  234. package/modern/locales/ruRU.js +1 -0
  235. package/modern/locales/skSK.js +16 -15
  236. package/modern/locales/svSE.js +116 -0
  237. package/modern/locales/trTR.js +1 -0
  238. package/modern/locales/ukUA.js +1 -0
  239. package/modern/locales/viVN.js +1 -0
  240. package/modern/locales/zhCN.js +1 -0
  241. package/modern/utils/keyboardUtils.js +4 -3
  242. package/node/DataGrid/DataGrid.js +4 -4
  243. package/node/colDef/gridCheckboxSelectionColDef.js +4 -2
  244. package/node/colDef/gridNumericColDef.js +1 -1
  245. package/node/colDef/gridStringOperators.js +11 -6
  246. package/node/components/GridRow.js +1 -1
  247. package/node/components/cell/GridBooleanCell.js +5 -3
  248. package/node/components/cell/GridEditBooleanCell.js +5 -3
  249. package/node/components/cell/GridEditDateCell.js +5 -3
  250. package/node/components/cell/GridEditInputCell.js +5 -3
  251. package/node/components/cell/GridEditSingleSelectCell.js +10 -7
  252. package/node/components/columnHeaders/GridColumnHeaderItem.js +5 -3
  253. package/node/components/columnSelection/GridCellCheckboxRenderer.js +0 -1
  254. package/node/components/columnSelection/GridHeaderCheckbox.js +0 -1
  255. package/node/components/containers/GridRootStyles.js +1 -1
  256. package/node/components/panel/GridColumnsPanel.js +3 -6
  257. package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
  258. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  259. package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  260. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +43 -20
  261. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
  262. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  263. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  264. package/node/components/panel/filterPanel/GridFilterPanel.js +1 -2
  265. package/node/components/toolbar/GridToolbarColumnsButton.js +0 -1
  266. package/node/components/toolbar/GridToolbarDensitySelector.js +0 -1
  267. package/node/components/toolbar/GridToolbarExportContainer.js +0 -1
  268. package/node/components/toolbar/GridToolbarFilterButton.js +0 -1
  269. package/node/constants/localeTextConstants.js +1 -0
  270. package/node/hooks/features/columns/useGridColumnSpanning.js +11 -16
  271. package/node/hooks/features/dimensions/useGridDimensions.js +37 -23
  272. package/node/hooks/features/editRows/useGridCellEditing.new.js +6 -0
  273. package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  274. package/node/hooks/features/editRows/useGridRowEditing.new.js +6 -0
  275. package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  276. package/node/hooks/features/filter/gridFilterUtils.js +7 -4
  277. package/node/hooks/features/rows/useGridRows.js +16 -3
  278. package/node/hooks/features/rows/useGridRowsMeta.js +80 -77
  279. package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  280. package/node/hooks/features/selection/useGridSelectionPreProcessors.js +7 -5
  281. package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -9
  282. package/node/hooks/utils/useGridApiContext.js +1 -1
  283. package/node/hooks/utils/useGridRootProps.js +1 -1
  284. package/node/index.js +1 -1
  285. package/node/locales/arSD.js +1 -0
  286. package/node/locales/bgBG.js +1 -0
  287. package/node/locales/csCZ.js +1 -0
  288. package/node/locales/daDK.js +1 -0
  289. package/node/locales/deDE.js +1 -0
  290. package/node/locales/elGR.js +1 -0
  291. package/node/locales/esES.js +1 -0
  292. package/node/locales/faIR.js +1 -0
  293. package/node/locales/fiFI.js +1 -0
  294. package/node/locales/frFR.js +1 -0
  295. package/node/locales/heIL.js +1 -0
  296. package/node/locales/huHU.js +1 -0
  297. package/node/locales/index.js +39 -0
  298. package/node/locales/itIT.js +1 -0
  299. package/node/locales/jaJP.js +1 -0
  300. package/node/locales/koKR.js +1 -0
  301. package/node/locales/nbNO.js +1 -0
  302. package/node/locales/nlNL.js +1 -0
  303. package/node/locales/plPL.js +1 -0
  304. package/node/locales/ptBR.js +1 -0
  305. package/node/locales/roRO.js +126 -0
  306. package/node/locales/ruRU.js +1 -0
  307. package/node/locales/skSK.js +16 -15
  308. package/node/locales/svSE.js +126 -0
  309. package/node/locales/trTR.js +1 -0
  310. package/node/locales/ukUA.js +1 -0
  311. package/node/locales/viVN.js +1 -0
  312. package/node/locales/zhCN.js +1 -0
  313. package/node/utils/keyboardUtils.js +4 -3
  314. package/package.json +3 -3
  315. package/utils/keyboardUtils.js +4 -3
@@ -19,15 +19,15 @@ var _Autocomplete = _interopRequireWildcard(require("@mui/material/Autocomplete"
19
19
 
20
20
  var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
21
21
 
22
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
23
-
24
22
  var _utils = require("@mui/material/utils");
25
23
 
26
24
  var _filterPanelUtils = require("./filterPanelUtils");
27
25
 
26
+ var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
27
+
28
28
  var _jsxRuntime = require("react/jsx-runtime");
29
29
 
30
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef"];
30
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
33
 
@@ -42,15 +42,36 @@ function GridFilterInputMultipleSingleSelect(props) {
42
42
  item,
43
43
  applyValue,
44
44
  apiRef,
45
- focusElementRef
45
+ focusElementRef,
46
+ color,
47
+ error,
48
+ helperText,
49
+ size,
50
+ variant = 'standard'
46
51
  } = props,
47
52
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
53
+ const TextFieldProps = {
54
+ color,
55
+ error,
56
+ helperText,
57
+ size,
58
+ variant
59
+ };
48
60
  const id = (0, _utils.unstable_useId)();
61
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
49
62
  const resolvedColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
50
63
  const resolvedValueOptions = React.useMemo(() => {
51
- return typeof (resolvedColumn == null ? void 0 : resolvedColumn.valueOptions) === 'function' ? resolvedColumn.valueOptions({
52
- field: resolvedColumn.field
53
- }) : resolvedColumn == null ? void 0 : resolvedColumn.valueOptions;
64
+ if (!(resolvedColumn != null && resolvedColumn.valueOptions)) {
65
+ return [];
66
+ }
67
+
68
+ if (typeof resolvedColumn.valueOptions === 'function') {
69
+ return resolvedColumn.valueOptions({
70
+ field: resolvedColumn.field
71
+ });
72
+ }
73
+
74
+ return resolvedColumn.valueOptions;
54
75
  }, [resolvedColumn]);
55
76
  const resolvedFormattedValueOptions = React.useMemo(() => {
56
77
  return resolvedValueOptions == null ? void 0 : resolvedValueOptions.map(_filterPanelUtils.getValueFromOption);
@@ -81,7 +102,7 @@ function GridFilterInputMultipleSingleSelect(props) {
81
102
 
82
103
  if (resolvedValueOptions !== undefined) {
83
104
  const itemValueIndexes = item.value.map(element => {
84
- // get the index matching between values and valueoptions
105
+ // get the index matching between values and valueOptions
85
106
  const formattedElement = (0, _filterPanelUtils.getValueFromOption)(element);
86
107
  const index = (resolvedFormattedValueOptions == null ? void 0 : resolvedFormattedValueOptions.findIndex(formatedOption => formatedOption === formattedElement)) || 0;
87
108
  return index;
@@ -107,8 +128,7 @@ function GridFilterInputMultipleSingleSelect(props) {
107
128
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Autocomplete.default, (0, _extends2.default)({
108
129
  multiple: true,
109
130
  limitTags: 1,
110
- options: resolvedValueOptions // TODO: avoid `any`?
111
- ,
131
+ options: resolvedValueOptions,
112
132
  isOptionEqualToValue: isOptionEqualToValue,
113
133
  filterOptions: filter,
114
134
  id: id,
@@ -121,16 +141,19 @@ function GridFilterInputMultipleSingleSelect(props) {
121
141
  }, getTagProps({
122
142
  index
123
143
  })))),
124
- renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, params, {
125
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
126
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
127
- InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
128
- shrink: true
129
- }),
130
- inputRef: focusElementRef,
131
- type: 'singleSelect',
132
- variant: "standard"
133
- }))
144
+ renderInput: params => {
145
+ var _rootProps$components;
146
+
147
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseTextField, (0, _extends2.default)({}, params, {
148
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
149
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
150
+ InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
151
+ shrink: true
152
+ }),
153
+ inputRef: focusElementRef,
154
+ type: "singleSelect"
155
+ }, TextFieldProps, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseTextField));
156
+ }
134
157
  }, other));
135
158
  }
136
159
 
@@ -19,13 +19,13 @@ var _Autocomplete = _interopRequireDefault(require("@mui/material/Autocomplete")
19
19
 
20
20
  var _Chip = _interopRequireDefault(require("@mui/material/Chip"));
21
21
 
22
- var _TextField = _interopRequireDefault(require("@mui/material/TextField"));
23
-
24
22
  var _utils = require("@mui/material/utils");
25
23
 
24
+ var _useGridRootProps = require("../../../hooks/utils/useGridRootProps");
25
+
26
26
  var _jsxRuntime = require("react/jsx-runtime");
27
27
 
28
- const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef"];
28
+ const _excluded = ["item", "applyValue", "type", "apiRef", "focusElementRef", "color", "error", "helperText", "size", "variant"];
29
29
 
30
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
31
31
 
@@ -37,11 +37,24 @@ function GridFilterInputMultipleValue(props) {
37
37
  applyValue,
38
38
  type,
39
39
  apiRef,
40
- focusElementRef
40
+ focusElementRef,
41
+ color,
42
+ error,
43
+ helperText,
44
+ size,
45
+ variant
41
46
  } = props,
42
47
  other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
48
+ const TextFieldProps = {
49
+ color,
50
+ error,
51
+ helperText,
52
+ size,
53
+ variant
54
+ };
43
55
  const [filterValueState, setFilterValueState] = React.useState(item.value || []);
44
56
  const id = (0, _utils.unstable_useId)();
57
+ const rootProps = (0, _useGridRootProps.useGridRootProps)();
45
58
  React.useEffect(() => {
46
59
  var _item$value;
47
60
 
@@ -75,16 +88,19 @@ function GridFilterInputMultipleValue(props) {
75
88
  }, getTagProps({
76
89
  index
77
90
  })))),
78
- renderInput: params => /*#__PURE__*/(0, _jsxRuntime.jsx)(_TextField.default, (0, _extends2.default)({}, params, {
79
- label: apiRef.current.getLocaleText('filterPanelInputLabel'),
80
- placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
81
- InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
82
- shrink: true
83
- }),
84
- inputRef: focusElementRef,
85
- type: type || 'text',
86
- variant: "standard"
87
- }))
91
+ renderInput: params => {
92
+ var _rootProps$components;
93
+
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseTextField, (0, _extends2.default)({}, params, {
95
+ label: apiRef.current.getLocaleText('filterPanelInputLabel'),
96
+ placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
97
+ InputLabelProps: (0, _extends2.default)({}, params.InputLabelProps, {
98
+ shrink: true
99
+ }),
100
+ inputRef: focusElementRef,
101
+ type: type || 'text'
102
+ }, TextFieldProps, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseTextField));
103
+ }
88
104
  }, other));
89
105
  }
90
106
 
@@ -93,7 +109,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputMultipleValue.propTypes =
93
109
  // | These PropTypes are generated from the TypeScript type definitions |
94
110
  // | To update them edit the TypeScript types and run "yarn proptypes" |
95
111
  // ----------------------------------------------------------------------
96
- apiRef: _propTypes.default.any.isRequired,
112
+ apiRef: _propTypes.default.shape({
113
+ current: _propTypes.default.object.isRequired
114
+ }).isRequired,
97
115
  applyValue: _propTypes.default.func.isRequired,
98
116
  focusElementRef: _propTypes.default
99
117
  /* @typescript-to-proptypes-ignore */
@@ -74,6 +74,10 @@ function GridFilterInputSingleSelect(props) {
74
74
  const isSelectNative = (_baseSelectProps$nati = baseSelectProps.native) != null ? _baseSelectProps$nati : true;
75
75
  const currentColumn = item.columnField ? apiRef.current.getColumn(item.columnField) : null;
76
76
  const currentValueOptions = React.useMemo(() => {
77
+ if (currentColumn === null) {
78
+ return undefined;
79
+ }
80
+
77
81
  return typeof currentColumn.valueOptions === 'function' ? currentColumn.valueOptions({
78
82
  field: currentColumn.field
79
83
  }) : currentColumn.valueOptions;
@@ -115,8 +119,8 @@ function GridFilterInputSingleSelect(props) {
115
119
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
116
120
  value: filterValueState,
117
121
  onChange: onFilterChange,
118
- type: type || 'text',
119
122
  variant: "standard",
123
+ type: type || 'text',
120
124
  InputLabelProps: {
121
125
  shrink: true
122
126
  },
@@ -135,7 +139,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputSingleSelect.propTypes =
135
139
  // | These PropTypes are generated from the TypeScript type definitions |
136
140
  // | To update them edit the TypeScript types and run "yarn proptypes" |
137
141
  // ----------------------------------------------------------------------
138
- apiRef: _propTypes.default.any.isRequired,
142
+ apiRef: _propTypes.default.shape({
143
+ current: _propTypes.default.object.isRequired
144
+ }).isRequired,
139
145
  applyValue: _propTypes.default.func.isRequired,
140
146
  focusElementRef: _propTypes.default
141
147
  /* @typescript-to-proptypes-ignore */
@@ -141,8 +141,8 @@ function GridFilterInputValue(props) {
141
141
  placeholder: apiRef.current.getLocaleText('filterPanelInputPlaceholder'),
142
142
  value: filterValueState,
143
143
  onChange: onFilterChange,
144
- type: type || 'text',
145
144
  variant: "standard",
145
+ type: type || 'text',
146
146
  InputProps: InputProps,
147
147
  InputLabelProps: {
148
148
  shrink: true
@@ -156,7 +156,9 @@ process.env.NODE_ENV !== "production" ? GridFilterInputValue.propTypes = {
156
156
  // | These PropTypes are generated from the TypeScript type definitions |
157
157
  // | To update them edit the TypeScript types and run "yarn proptypes" |
158
158
  // ----------------------------------------------------------------------
159
- apiRef: _propTypes.default.any.isRequired,
159
+ apiRef: _propTypes.default.shape({
160
+ current: _propTypes.default.object.isRequired
161
+ }).isRequired,
160
162
  applyValue: _propTypes.default.func.isRequired,
161
163
  focusElementRef: _propTypes.default
162
164
  /* @typescript-to-proptypes-ignore */
@@ -140,8 +140,7 @@ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(p
140
140
  }), !rootProps.disableMultipleColumnsFiltering && /*#__PURE__*/(0, _jsxRuntime.jsx)(_GridPanelFooter.GridPanelFooter, {
141
141
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
142
142
  onClick: addNewFilter,
143
- startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridAddIcon, {}),
144
- color: "primary"
143
+ startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.GridAddIcon, {})
145
144
  }, (_rootProps$components = rootProps.componentsProps) == null ? void 0 : _rootProps$components.baseButton, {
146
145
  children: apiRef.current.getLocaleText('filterPanelAddFilter')
147
146
  }))
@@ -63,7 +63,6 @@ const GridToolbarColumnsButton = /*#__PURE__*/React.forwardRef(function GridTool
63
63
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
64
64
  ref: ref,
65
65
  size: "small",
66
- color: "primary",
67
66
  "aria-label": apiRef.current.getLocaleText('toolbarColumnsLabel'),
68
67
  startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.ColumnSelectorIcon, {})
69
68
  }, other, {
@@ -123,7 +123,6 @@ const GridToolbarDensitySelector = /*#__PURE__*/React.forwardRef(function GridTo
123
123
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
124
124
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
125
125
  ref: handleRef,
126
- color: "primary",
127
126
  size: "small",
128
127
  startIcon: startIcon,
129
128
  "aria-label": apiRef.current.getLocaleText('toolbarDensityLabel'),
@@ -75,7 +75,6 @@ const GridToolbarExportContainer = /*#__PURE__*/React.forwardRef(function GridTo
75
75
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
76
76
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
77
77
  ref: handleRef,
78
- color: "primary",
79
78
  size: "small",
80
79
  startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.ExportIcon, {}),
81
80
  "aria-expanded": open ? 'true' : undefined,
@@ -136,7 +136,6 @@ const GridToolbarFilterButton = /*#__PURE__*/React.forwardRef(function GridToolb
136
136
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.components.BaseButton, (0, _extends2.default)({
137
137
  ref: ref,
138
138
  size: "small",
139
- color: "primary",
140
139
  "aria-label": apiRef.current.getLocaleText('toolbarFiltersLabel'),
141
140
  startIcon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Badge.default, {
142
141
  badgeContent: activeFilters.length,
@@ -111,6 +111,7 @@ const GRID_DEFAULT_LOCALE_TEXT = {
111
111
  groupColumn: name => `Group by ${name}`,
112
112
  unGroupColumn: name => `Stop grouping by ${name}`,
113
113
  // Master/detail
114
+ detailPanelToggle: 'Detail panel toggle',
114
115
  expandDetailPanel: 'Expand',
115
116
  collapseDetailPanel: 'Collapse',
116
117
  // Used core components translation keys
@@ -1,26 +1,27 @@
1
1
  "use strict";
2
2
 
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
3
  Object.defineProperty(exports, "__esModule", {
6
4
  value: true
7
5
  });
8
6
  exports.useGridColumnSpanning = void 0;
9
7
 
10
- var _react = _interopRequireDefault(require("react"));
8
+ var React = _interopRequireWildcard(require("react"));
11
9
 
12
10
  var _useGridApiMethod = require("../../utils/useGridApiMethod");
13
11
 
14
12
  var _useGridApiEventHandler = require("../../utils/useGridApiEventHandler");
15
13
 
14
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
16
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
16
18
  /**
17
19
  * @requires useGridColumns (method, event)
18
20
  * @requires useGridParamsApi (method)
19
21
  */
20
22
  const useGridColumnSpanning = apiRef => {
21
- const lookup = _react.default.useRef({});
22
-
23
- const setCellColSpanInfo = _react.default.useCallback((rowId, columnIndex, cellColSpanInfo) => {
23
+ const lookup = React.useRef({});
24
+ const setCellColSpanInfo = React.useCallback((rowId, columnIndex, cellColSpanInfo) => {
24
25
  const sizes = lookup.current;
25
26
 
26
27
  if (!sizes[rowId]) {
@@ -29,15 +30,13 @@ const useGridColumnSpanning = apiRef => {
29
30
 
30
31
  sizes[rowId][columnIndex] = cellColSpanInfo;
31
32
  }, []);
32
-
33
- const getCellColSpanInfo = _react.default.useCallback((rowId, columnIndex) => {
33
+ const getCellColSpanInfo = React.useCallback((rowId, columnIndex) => {
34
34
  var _lookup$current$rowId;
35
35
 
36
36
  return (_lookup$current$rowId = lookup.current[rowId]) == null ? void 0 : _lookup$current$rowId[columnIndex];
37
37
  }, []); // Calculate `colSpan` for the cell.
38
38
 
39
-
40
- const calculateCellColSpan = _react.default.useCallback(params => {
39
+ const calculateCellColSpan = React.useCallback(params => {
41
40
  const {
42
41
  columnIndex,
43
42
  rowId,
@@ -91,8 +90,7 @@ const useGridColumnSpanning = apiRef => {
91
90
  };
92
91
  }, [apiRef, setCellColSpanInfo]); // Calculate `colSpan` for each cell in the row
93
92
 
94
-
95
- const calculateColSpan = _react.default.useCallback(({
93
+ const calculateColSpan = React.useCallback(({
96
94
  rowId,
97
95
  minFirstColumn,
98
96
  maxLastColumn
@@ -110,18 +108,15 @@ const useGridColumnSpanning = apiRef => {
110
108
  }
111
109
  }
112
110
  }, [calculateCellColSpan]);
113
-
114
111
  const columnSpanningApi = {
115
112
  unstable_getCellColSpanInfo: getCellColSpanInfo,
116
113
  unstable_calculateColSpan: calculateColSpan
117
114
  };
118
115
  (0, _useGridApiMethod.useGridApiMethod)(apiRef, columnSpanningApi, 'GridColumnSpanningAPI');
119
-
120
- const handleColumnReorderChange = _react.default.useCallback(() => {
116
+ const handleColumnReorderChange = React.useCallback(() => {
121
117
  // `colSpan` needs to be recalculated after column reordering
122
118
  lookup.current = {};
123
119
  }, []);
124
-
125
120
  (0, _useGridApiEventHandler.useGridApiEventHandler)(apiRef, 'columnOrderChange', handleColumnReorderChange);
126
121
  };
127
122
 
@@ -58,7 +58,7 @@ const hasScroll = ({
58
58
 
59
59
  function useGridDimensions(apiRef, props) {
60
60
  const logger = (0, _useGridLogger.useGridLogger)(apiRef, 'useResizeContainer');
61
- const warningShown = React.useRef(false);
61
+ const errorShown = React.useRef(false);
62
62
  const rootDimensionsRef = React.useRef(null);
63
63
  const fullDimensionsRef = React.useRef(null);
64
64
  const rowsMeta = (0, _utils2.useGridSelector)(apiRef, _gridRowsMetaSelector.gridRowsMetaSelector);
@@ -92,21 +92,34 @@ function useGridDimensions(apiRef, props) {
92
92
  rootElement.removeChild(scrollDiv);
93
93
  }
94
94
 
95
- const viewportOuterSize = {
96
- width: rootDimensionsRef.current.width,
97
- height: props.autoHeight ? rowsMeta.currentPageTotalHeight : rootDimensionsRef.current.height - headerHeight
98
- };
99
- const {
100
- hasScrollX,
101
- hasScrollY
102
- } = hasScroll({
103
- content: {
104
- width: Math.round(columnsTotalWidth),
105
- height: rowsMeta.currentPageTotalHeight
106
- },
107
- container: viewportOuterSize,
108
- scrollBarSize
109
- });
95
+ let viewportOuterSize;
96
+ let hasScrollX;
97
+ let hasScrollY;
98
+
99
+ if (props.autoHeight) {
100
+ hasScrollY = false;
101
+ hasScrollX = Math.round(columnsTotalWidth) > rootDimensionsRef.current.width;
102
+ viewportOuterSize = {
103
+ width: rootDimensionsRef.current.width,
104
+ height: rowsMeta.currentPageTotalHeight + (hasScrollX ? scrollBarSize : 0)
105
+ };
106
+ } else {
107
+ viewportOuterSize = {
108
+ width: rootDimensionsRef.current.width,
109
+ height: rootDimensionsRef.current.height - headerHeight
110
+ };
111
+ const scrollInformation = hasScroll({
112
+ content: {
113
+ width: Math.round(columnsTotalWidth),
114
+ height: rowsMeta.currentPageTotalHeight
115
+ },
116
+ container: viewportOuterSize,
117
+ scrollBarSize
118
+ });
119
+ hasScrollY = scrollInformation.hasScrollY;
120
+ hasScrollX = scrollInformation.hasScrollX;
121
+ }
122
+
110
123
  const viewportInnerSize = {
111
124
  width: viewportOuterSize.width - (hasScrollY ? scrollBarSize : 0),
112
125
  height: viewportOuterSize.height - (hasScrollX ? scrollBarSize : 0)
@@ -115,7 +128,8 @@ function useGridDimensions(apiRef, props) {
115
128
  viewportOuterSize,
116
129
  viewportInnerSize,
117
130
  hasScrollX,
118
- hasScrollY
131
+ hasScrollY,
132
+ scrollBarSize
119
133
  };
120
134
  const prevDimensions = fullDimensionsRef.current;
121
135
  fullDimensionsRef.current = newFullDimensions;
@@ -165,14 +179,14 @@ function useGridDimensions(apiRef, props) {
165
179
 
166
180
  const isJSDOM = /jsdom/.test(window.navigator.userAgent);
167
181
 
168
- if (size.height === 0 && !warningShown.current && !props.autoHeight && !isJSDOM) {
169
- logger.warn(['The parent of the grid has an empty height.', 'You need to make sure the container has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'You can find a solution in the docs:', 'https://mui.com/x/react-data-grid/layout/'].join('\n'));
170
- warningShown.current = true;
182
+ if (size.height === 0 && !errorShown.current && !props.autoHeight && !isJSDOM) {
183
+ logger.error(['The parent DOM element of the data grid has an empty height.', 'Please make sure that this element has an intrinsic height.', 'The grid displays with a height of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
184
+ errorShown.current = true;
171
185
  }
172
186
 
173
- if (size.width === 0 && !warningShown.current && !isJSDOM) {
174
- logger.warn(['The parent of the grid has an empty width.', 'You need to make sure the container has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'You can find a solution in the docs:', 'https://mui.com/x/react-data-grid/layout/'].join('\n'));
175
- warningShown.current = true;
187
+ if (size.width === 0 && !errorShown.current && !isJSDOM) {
188
+ logger.error(['The parent DOM element of the data grid has an empty width.', 'Please make sure that this element has an intrinsic width.', 'The grid displays with a width of 0px.', '', 'More details: https://mui.com/r/x-data-grid-no-dimensions.'].join('\n'));
189
+ errorShown.current = true;
176
190
  }
177
191
 
178
192
  if (isTestEnvironment) {
@@ -95,6 +95,12 @@ const useGridCellEditing = (apiRef, props) => {
95
95
  }, [apiRef]);
96
96
  const handleCellKeyDown = React.useCallback((params, event) => {
97
97
  if (params.cellMode === _gridEditRowModel.GridCellModes.Edit) {
98
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
99
+ // TODO: `event.which` is depricated but this is a temporary workaround
100
+ if (event.which === 229) {
101
+ return;
102
+ }
103
+
98
104
  let reason;
99
105
 
100
106
  if (event.key === 'Escape') {
@@ -199,6 +199,12 @@ const useCellEditing = (apiRef, props) => {
199
199
  };
200
200
  (0, _useGridApiMethod.useGridApiMethod)(apiRef, cellEditingApi, 'EditRowApi');
201
201
  const handleCellKeyDown = React.useCallback(async (params, event) => {
202
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
203
+ // TODO: `event.which` is depricated but this is a temporary workaround
204
+ if (event.which === 229) {
205
+ return;
206
+ }
207
+
202
208
  const {
203
209
  id,
204
210
  field,
@@ -134,6 +134,12 @@ const useGridRowEditing = (apiRef, props) => {
134
134
  }, []);
135
135
  const handleCellKeyDown = React.useCallback((params, event) => {
136
136
  if (params.cellMode === _gridEditRowModel.GridRowModes.Edit) {
137
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
138
+ // TODO: `event.which` is depricated but this is a temporary workaround
139
+ if (event.which === 229) {
140
+ return;
141
+ }
142
+
137
143
  let reason;
138
144
 
139
145
  if (event.key === 'Escape') {
@@ -199,6 +199,12 @@ const useGridRowEditing = (apiRef, props) => {
199
199
  };
200
200
  (0, _useGridApiMethod.useGridApiMethod)(apiRef, rowEditingApi, 'EditRowApi');
201
201
  const handleCellKeyDown = React.useCallback(async (params, event) => {
202
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
203
+ // TODO: `event.which` is depricated but this is a temporary workaround
204
+ if (event.which === 229) {
205
+ return;
206
+ }
207
+
202
208
  const {
203
209
  cellMode,
204
210
  isEditable
@@ -30,8 +30,9 @@ const cleanFilterItem = (item, apiRef) => {
30
30
  }
31
31
 
32
32
  if (cleanItem.operatorValue == null) {
33
- // we select a default operator
34
- const column = apiRef.current.getColumn(cleanItem.columnField);
33
+ // Selects a default operator
34
+ // We don't use `apiRef.current.getColumn` because it is not ready during state initialization
35
+ const column = (0, _columns.gridColumnLookupSelector)(apiRef)[cleanItem.columnField];
35
36
  cleanItem.operatorValue = column && column.filterOperators[0].value;
36
37
  }
37
38
 
@@ -208,14 +209,16 @@ const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
208
209
  const sanitizedQuickFilterValues = quickFilterValues.filter((value, index) => Object.keys(appliersPerColumnField).some(field => appliersPerColumnField[field][index] != null));
209
210
  return (rowId, shouldApplyFilter) => {
210
211
  const usedCellParams = {};
212
+ const columnsFieldsToFilter = [];
211
213
  Object.keys(appliersPerColumnField).forEach(columnField => {
212
214
  if (!shouldApplyFilter || shouldApplyFilter(columnField)) {
213
215
  usedCellParams[columnField] = apiRef.current.getCellParams(rowId, columnField);
216
+ columnsFieldsToFilter.push(columnField);
214
217
  }
215
218
  }); // Return `false` as soon as we have a quick filter value that does not match any column
216
219
 
217
220
  if (quickFilterLogicOperator === _models.GridLinkOperator.And) {
218
- return sanitizedQuickFilterValues.every((value, index) => Object.keys(appliersPerColumnField).some(field => {
221
+ return sanitizedQuickFilterValues.every((value, index) => columnsFieldsToFilter.some(field => {
219
222
  var _appliersPerColumnFie, _appliersPerColumnFie2;
220
223
 
221
224
  if (appliersPerColumnField[field][index] == null) {
@@ -227,7 +230,7 @@ const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
227
230
  } // Return `true` as soon as we have have a quick filter value that match any column
228
231
 
229
232
 
230
- return sanitizedQuickFilterValues.some((value, index) => Object.keys(appliersPerColumnField).some(field => {
233
+ return sanitizedQuickFilterValues.some((value, index) => columnsFieldsToFilter.some(field => {
231
234
  var _appliersPerColumnFie3, _appliersPerColumnFie4;
232
235
 
233
236
  if (appliersPerColumnField[field][index] == null) {
@@ -124,7 +124,7 @@ const useGridRows = (apiRef, props) => {
124
124
  const updateRows = React.useCallback(updates => {
125
125
  if (props.signature === _useGridApiEventHandler.GridSignature.DataGrid && updates.length > 1) {
126
126
  // TODO: Add test with direct call to `apiRef.current.updateRows` in DataGrid after enabling the `apiRef` on the free plan.
127
- throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
127
+ throw new Error(["MUI: You can't update several rows at once in `apiRef.current.updateRows` on the DataGrid.", 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
128
128
  } // we remove duplicate updates. A server can batch updates, and send several updates for the same row in one fn call.
129
129
 
130
130
 
@@ -349,10 +349,23 @@ const useGridRows = (apiRef, props) => {
349
349
  if (isFirstRender.current) {
350
350
  isFirstRender.current = false;
351
351
  return;
352
- } // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
352
+ }
353
+
354
+ const areNewRowsAlreadyInState = apiRef.current.unstable_caches.rows.rowsBeforePartialUpdates === props.rows;
355
+ const isNewLoadingAlreadyInState = apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading; // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
353
356
 
357
+ if (areNewRowsAlreadyInState) {
358
+ // If the loading prop has changed, we need to update its value in the state because it won't be done by `throttledRowsChange`
359
+ if (!isNewLoadingAlreadyInState) {
360
+ apiRef.current.setState(state => (0, _extends2.default)({}, state, {
361
+ rows: (0, _extends2.default)({}, state.rows, {
362
+ loading: props.loading
363
+ })
364
+ }));
365
+ apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates = props.loading;
366
+ apiRef.current.forceUpdate();
367
+ }
354
368
 
355
- if (apiRef.current.unstable_caches.rows.rowsBeforePartialUpdates === props.rows && apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading) {
356
369
  return;
357
370
  }
358
371