@mui/x-data-grid 6.6.0 → 6.8.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 (313) hide show
  1. package/CHANGELOG.md +147 -13
  2. package/components/GridColumnHeaders.d.ts +2 -2
  3. package/components/GridColumnHeaders.js +3 -1
  4. package/components/GridRow.d.ts +2 -2
  5. package/components/GridRow.js +23 -69
  6. package/components/cell/GridCell.d.ts +24 -15
  7. package/components/cell/GridCell.js +422 -45
  8. package/components/cell/index.d.ts +2 -1
  9. package/components/cell/index.js +1 -1
  10. package/components/containers/GridRootStyles.js +38 -17
  11. package/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  12. package/components/panel/GridColumnsPanel.d.ts +14 -0
  13. package/components/panel/GridColumnsPanel.js +14 -0
  14. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +0 -1
  15. package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
  16. package/components/panel/filterPanel/GridFilterInputDate.d.ts +0 -1
  17. package/components/panel/filterPanel/GridFilterInputDate.js +1 -6
  18. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +0 -1
  19. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +5 -6
  20. package/components/panel/filterPanel/GridFilterInputValue.d.ts +0 -1
  21. package/components/panel/filterPanel/GridFilterInputValue.js +1 -6
  22. package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -0
  23. package/components/panel/filterPanel/GridFilterPanel.js +8 -0
  24. package/components/toolbar/GridToolbar.js +2 -2
  25. package/components/virtualization/GridVirtualScroller.js +4 -9
  26. package/components/virtualization/GridVirtualScrollerContent.js +11 -20
  27. package/constants/defaultGridSlotsComponents.js +6 -2
  28. package/constants/gridClasses.d.ts +4 -0
  29. package/constants/gridClasses.js +1 -1
  30. package/constants/localeTextConstants.js +4 -4
  31. package/hooks/core/useGridApiInitialization.js +4 -1
  32. package/hooks/core/useGridStateInitialization.js +2 -9
  33. package/hooks/features/clipboard/useGridClipboard.js +1 -4
  34. package/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  35. package/hooks/features/editing/useGridCellEditing.js +5 -3
  36. package/hooks/features/editing/useGridRowEditing.js +14 -6
  37. package/hooks/features/filter/gridFilterUtils.d.ts +4 -1
  38. package/hooks/features/filter/gridFilterUtils.js +19 -13
  39. package/hooks/features/filter/useGridFilter.js +4 -2
  40. package/hooks/features/focus/useGridFocus.js +10 -4
  41. package/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  42. package/hooks/features/rows/useGridParamsApi.d.ts +2 -0
  43. package/hooks/features/rows/useGridParamsApi.js +7 -15
  44. package/hooks/features/rows/useGridRowsMeta.js +1 -1
  45. package/hooks/features/sorting/useGridSorting.js +2 -1
  46. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +8 -816
  47. package/hooks/features/virtualization/useGridVirtualScroller.js +42 -40
  48. package/hooks/utils/index.d.ts +1 -1
  49. package/hooks/utils/index.js +1 -1
  50. package/hooks/utils/useGridSelector.d.ts +3 -1
  51. package/hooks/utils/useGridSelector.js +37 -6
  52. package/hooks/utils/useLazyRef.d.ts +2 -0
  53. package/hooks/utils/useLazyRef.js +9 -0
  54. package/hooks/utils/useOnMount.d.ts +2 -0
  55. package/hooks/utils/useOnMount.js +7 -0
  56. package/index.js +1 -1
  57. package/legacy/components/GridColumnHeaders.js +3 -1
  58. package/legacy/components/GridRow.js +25 -69
  59. package/legacy/components/cell/GridCell.js +425 -46
  60. package/legacy/components/cell/index.js +1 -1
  61. package/legacy/components/containers/GridRootStyles.js +25 -18
  62. package/legacy/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  63. package/legacy/components/panel/GridColumnsPanel.js +14 -0
  64. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +7 -7
  65. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +1 -5
  66. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -6
  67. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +1 -5
  68. package/legacy/components/panel/filterPanel/GridFilterPanel.js +8 -0
  69. package/legacy/components/toolbar/GridToolbar.js +2 -2
  70. package/legacy/components/virtualization/GridVirtualScroller.js +4 -7
  71. package/legacy/components/virtualization/GridVirtualScrollerContent.js +10 -17
  72. package/legacy/constants/defaultGridSlotsComponents.js +6 -2
  73. package/legacy/constants/gridClasses.js +1 -1
  74. package/legacy/constants/localeTextConstants.js +4 -4
  75. package/legacy/hooks/core/useGridApiInitialization.js +4 -1
  76. package/legacy/hooks/core/useGridStateInitialization.js +2 -7
  77. package/legacy/hooks/features/clipboard/useGridClipboard.js +1 -4
  78. package/legacy/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  79. package/legacy/hooks/features/editing/useGridCellEditing.js +5 -3
  80. package/legacy/hooks/features/editing/useGridRowEditing.js +15 -7
  81. package/legacy/hooks/features/filter/gridFilterUtils.js +23 -19
  82. package/legacy/hooks/features/filter/useGridFilter.js +4 -2
  83. package/legacy/hooks/features/focus/useGridFocus.js +10 -4
  84. package/legacy/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  85. package/legacy/hooks/features/rows/useGridParamsApi.js +23 -15
  86. package/legacy/hooks/features/rows/useGridRowsMeta.js +1 -1
  87. package/legacy/hooks/features/sorting/useGridSorting.js +2 -1
  88. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +40 -36
  89. package/legacy/hooks/utils/index.js +1 -1
  90. package/legacy/hooks/utils/useGridSelector.js +43 -5
  91. package/legacy/hooks/utils/useLazyRef.js +9 -0
  92. package/legacy/hooks/utils/useOnMount.js +7 -0
  93. package/legacy/index.js +1 -1
  94. package/legacy/locales/arSD.js +4 -4
  95. package/legacy/locales/beBY.js +4 -4
  96. package/legacy/locales/bgBG.js +4 -4
  97. package/legacy/locales/csCZ.js +25 -27
  98. package/legacy/locales/daDK.js +4 -4
  99. package/legacy/locales/deDE.js +25 -27
  100. package/legacy/locales/elGR.js +70 -79
  101. package/legacy/locales/esES.js +4 -4
  102. package/legacy/locales/faIR.js +4 -4
  103. package/legacy/locales/fiFI.js +4 -4
  104. package/legacy/locales/heIL.js +4 -4
  105. package/legacy/locales/huHU.js +4 -4
  106. package/legacy/locales/itIT.js +4 -4
  107. package/legacy/locales/jaJP.js +4 -4
  108. package/legacy/locales/koKR.js +4 -4
  109. package/legacy/locales/nbNO.js +4 -4
  110. package/legacy/locales/plPL.js +4 -4
  111. package/legacy/locales/ptBR.js +4 -4
  112. package/legacy/locales/roRO.js +4 -4
  113. package/legacy/locales/ruRU.js +4 -4
  114. package/legacy/locales/skSK.js +4 -4
  115. package/legacy/locales/svSE.js +4 -4
  116. package/legacy/locales/trTR.js +16 -17
  117. package/legacy/locales/ukUA.js +4 -4
  118. package/legacy/locales/urPK.js +4 -4
  119. package/legacy/locales/viVN.js +4 -4
  120. package/legacy/locales/zhCN.js +4 -4
  121. package/legacy/locales/zhTW.js +4 -4
  122. package/legacy/utils/EventManager.js +2 -2
  123. package/legacy/utils/Store.js +34 -0
  124. package/legacy/utils/doesSupportPreventScroll.js +13 -0
  125. package/legacy/utils/fastMemo.js +5 -0
  126. package/legacy/utils/fastObjectShallowCompare.js +32 -0
  127. package/legacy/utils/keyboardUtils.js +4 -2
  128. package/locales/arSD.js +4 -4
  129. package/locales/beBY.js +4 -4
  130. package/locales/bgBG.js +4 -4
  131. package/locales/csCZ.js +25 -27
  132. package/locales/daDK.js +4 -4
  133. package/locales/deDE.js +25 -27
  134. package/locales/elGR.js +66 -79
  135. package/locales/esES.js +4 -4
  136. package/locales/faIR.js +4 -4
  137. package/locales/fiFI.js +4 -4
  138. package/locales/heIL.js +4 -4
  139. package/locales/huHU.js +4 -4
  140. package/locales/itIT.js +4 -4
  141. package/locales/jaJP.js +4 -4
  142. package/locales/koKR.js +4 -4
  143. package/locales/nbNO.js +4 -4
  144. package/locales/plPL.js +4 -4
  145. package/locales/ptBR.js +4 -4
  146. package/locales/roRO.js +4 -4
  147. package/locales/ruRU.js +4 -4
  148. package/locales/skSK.js +4 -4
  149. package/locales/svSE.js +4 -4
  150. package/locales/trTR.js +16 -17
  151. package/locales/ukUA.js +4 -4
  152. package/locales/urPK.js +4 -4
  153. package/locales/viVN.js +4 -4
  154. package/locales/zhCN.js +4 -4
  155. package/locales/zhTW.js +4 -4
  156. package/models/api/gridCoreApi.d.ts +6 -0
  157. package/models/colDef/gridColDef.d.ts +4 -3
  158. package/models/colDef/gridColType.d.ts +3 -1
  159. package/models/events/gridEventLookup.d.ts +11 -3
  160. package/modern/components/GridColumnHeaders.js +3 -1
  161. package/modern/components/GridRow.js +22 -69
  162. package/modern/components/cell/GridCell.js +421 -45
  163. package/modern/components/cell/index.js +1 -1
  164. package/modern/components/containers/GridRootStyles.js +38 -17
  165. package/modern/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  166. package/modern/components/panel/GridColumnsPanel.js +14 -0
  167. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
  168. package/modern/components/panel/filterPanel/GridFilterInputDate.js +1 -6
  169. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +5 -6
  170. package/modern/components/panel/filterPanel/GridFilterInputValue.js +1 -6
  171. package/modern/components/panel/filterPanel/GridFilterPanel.js +8 -0
  172. package/modern/components/toolbar/GridToolbar.js +2 -2
  173. package/modern/components/virtualization/GridVirtualScroller.js +4 -9
  174. package/modern/components/virtualization/GridVirtualScrollerContent.js +10 -20
  175. package/modern/constants/defaultGridSlotsComponents.js +6 -2
  176. package/modern/constants/gridClasses.js +1 -1
  177. package/modern/constants/localeTextConstants.js +4 -4
  178. package/modern/hooks/core/useGridApiInitialization.js +4 -1
  179. package/modern/hooks/core/useGridStateInitialization.js +2 -9
  180. package/modern/hooks/features/clipboard/useGridClipboard.js +1 -4
  181. package/modern/hooks/features/columnHeaders/useGridColumnHeaders.js +9 -3
  182. package/modern/hooks/features/editing/useGridCellEditing.js +5 -3
  183. package/modern/hooks/features/editing/useGridRowEditing.js +14 -6
  184. package/modern/hooks/features/filter/gridFilterUtils.js +17 -12
  185. package/modern/hooks/features/filter/useGridFilter.js +4 -2
  186. package/modern/hooks/features/focus/useGridFocus.js +9 -4
  187. package/modern/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  188. package/modern/hooks/features/rows/useGridParamsApi.js +7 -15
  189. package/modern/hooks/features/rows/useGridRowsMeta.js +1 -1
  190. package/modern/hooks/features/sorting/useGridSorting.js +2 -1
  191. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +42 -40
  192. package/modern/hooks/utils/index.js +1 -1
  193. package/modern/hooks/utils/useGridSelector.js +37 -6
  194. package/modern/hooks/utils/useLazyRef.js +9 -0
  195. package/modern/hooks/utils/useOnMount.js +7 -0
  196. package/modern/index.js +1 -1
  197. package/modern/locales/arSD.js +4 -4
  198. package/modern/locales/beBY.js +4 -4
  199. package/modern/locales/bgBG.js +4 -4
  200. package/modern/locales/csCZ.js +25 -27
  201. package/modern/locales/daDK.js +4 -4
  202. package/modern/locales/deDE.js +25 -27
  203. package/modern/locales/elGR.js +66 -79
  204. package/modern/locales/esES.js +4 -4
  205. package/modern/locales/faIR.js +4 -4
  206. package/modern/locales/fiFI.js +4 -4
  207. package/modern/locales/heIL.js +4 -4
  208. package/modern/locales/huHU.js +4 -4
  209. package/modern/locales/itIT.js +4 -4
  210. package/modern/locales/jaJP.js +4 -4
  211. package/modern/locales/koKR.js +4 -4
  212. package/modern/locales/nbNO.js +4 -4
  213. package/modern/locales/plPL.js +4 -4
  214. package/modern/locales/ptBR.js +4 -4
  215. package/modern/locales/roRO.js +4 -4
  216. package/modern/locales/ruRU.js +4 -4
  217. package/modern/locales/skSK.js +4 -4
  218. package/modern/locales/svSE.js +4 -4
  219. package/modern/locales/trTR.js +16 -17
  220. package/modern/locales/ukUA.js +4 -4
  221. package/modern/locales/urPK.js +4 -4
  222. package/modern/locales/viVN.js +4 -4
  223. package/modern/locales/zhCN.js +4 -4
  224. package/modern/locales/zhTW.js +4 -4
  225. package/modern/utils/EventManager.js +2 -2
  226. package/modern/utils/Store.js +24 -0
  227. package/modern/utils/doesSupportPreventScroll.js +13 -0
  228. package/modern/utils/fastMemo.js +5 -0
  229. package/modern/utils/fastObjectShallowCompare.js +32 -0
  230. package/modern/utils/keyboardUtils.js +4 -2
  231. package/node/components/GridColumnHeaders.js +4 -2
  232. package/node/components/GridRow.js +22 -69
  233. package/node/components/cell/GridCell.js +424 -47
  234. package/node/components/cell/index.js +17 -10
  235. package/node/components/containers/GridRootStyles.js +38 -17
  236. package/node/components/menu/columnMenu/GridColumnHeaderMenu.js +1 -1
  237. package/node/components/panel/GridColumnsPanel.js +14 -0
  238. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +6 -7
  239. package/node/components/panel/filterPanel/GridFilterInputDate.js +1 -6
  240. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +5 -6
  241. package/node/components/panel/filterPanel/GridFilterInputValue.js +1 -6
  242. package/node/components/panel/filterPanel/GridFilterPanel.js +8 -0
  243. package/node/components/toolbar/GridToolbar.js +2 -2
  244. package/node/components/virtualization/GridVirtualScroller.js +4 -9
  245. package/node/components/virtualization/GridVirtualScrollerContent.js +10 -20
  246. package/node/constants/defaultGridSlotsComponents.js +4 -1
  247. package/node/constants/gridClasses.js +1 -1
  248. package/node/constants/localeTextConstants.js +4 -4
  249. package/node/hooks/core/useGridApiInitialization.js +4 -1
  250. package/node/hooks/core/useGridStateInitialization.js +2 -9
  251. package/node/hooks/features/clipboard/useGridClipboard.js +1 -4
  252. package/node/hooks/features/columnHeaders/useGridColumnHeaders.js +8 -2
  253. package/node/hooks/features/editing/useGridCellEditing.js +5 -3
  254. package/node/hooks/features/editing/useGridRowEditing.js +14 -6
  255. package/node/hooks/features/filter/gridFilterUtils.js +17 -12
  256. package/node/hooks/features/filter/useGridFilter.js +7 -5
  257. package/node/hooks/features/focus/useGridFocus.js +9 -4
  258. package/node/hooks/features/keyboardNavigation/useGridKeyboardNavigation.js +2 -3
  259. package/node/hooks/features/rows/useGridParamsApi.js +9 -15
  260. package/node/hooks/features/rows/useGridRowsMeta.js +1 -1
  261. package/node/hooks/features/sorting/useGridSorting.js +2 -1
  262. package/node/hooks/features/virtualization/useGridVirtualScroller.js +42 -38
  263. package/node/hooks/utils/index.js +14 -10
  264. package/node/hooks/utils/useGridSelector.js +41 -7
  265. package/node/hooks/utils/useLazyRef.js +17 -0
  266. package/node/hooks/utils/useOnMount.js +15 -0
  267. package/node/index.js +1 -1
  268. package/node/locales/arSD.js +4 -4
  269. package/node/locales/beBY.js +4 -4
  270. package/node/locales/bgBG.js +4 -4
  271. package/node/locales/csCZ.js +25 -27
  272. package/node/locales/daDK.js +4 -4
  273. package/node/locales/deDE.js +25 -27
  274. package/node/locales/elGR.js +66 -79
  275. package/node/locales/esES.js +4 -4
  276. package/node/locales/faIR.js +4 -4
  277. package/node/locales/fiFI.js +4 -4
  278. package/node/locales/heIL.js +4 -4
  279. package/node/locales/huHU.js +4 -4
  280. package/node/locales/itIT.js +4 -4
  281. package/node/locales/jaJP.js +4 -4
  282. package/node/locales/koKR.js +4 -4
  283. package/node/locales/nbNO.js +4 -4
  284. package/node/locales/plPL.js +4 -4
  285. package/node/locales/ptBR.js +4 -4
  286. package/node/locales/roRO.js +4 -4
  287. package/node/locales/ruRU.js +4 -4
  288. package/node/locales/skSK.js +4 -4
  289. package/node/locales/svSE.js +4 -4
  290. package/node/locales/trTR.js +16 -17
  291. package/node/locales/ukUA.js +4 -4
  292. package/node/locales/urPK.js +4 -4
  293. package/node/locales/viVN.js +4 -4
  294. package/node/locales/zhCN.js +4 -4
  295. package/node/locales/zhTW.js +4 -4
  296. package/node/utils/EventManager.js +2 -2
  297. package/node/utils/Store.js +31 -0
  298. package/node/utils/doesSupportPreventScroll.js +19 -0
  299. package/node/utils/fastMemo.js +13 -0
  300. package/node/utils/fastObjectShallowCompare.js +38 -0
  301. package/node/utils/keyboardUtils.js +4 -2
  302. package/package.json +1 -1
  303. package/themeAugmentation/overrides.d.ts +1 -1
  304. package/utils/EventManager.js +2 -2
  305. package/utils/Store.d.ts +11 -0
  306. package/utils/Store.js +24 -0
  307. package/utils/doesSupportPreventScroll.d.ts +1 -0
  308. package/utils/doesSupportPreventScroll.js +13 -0
  309. package/utils/fastMemo.d.ts +1 -0
  310. package/utils/fastMemo.js +5 -0
  311. package/utils/fastObjectShallowCompare.d.ts +1 -0
  312. package/utils/fastObjectShallowCompare.js +32 -0
  313. package/utils/keyboardUtils.js +4 -2
package/locales/itIT.js CHANGED
@@ -83,10 +83,10 @@ const itITGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'qualunque',
package/locales/jaJP.js CHANGED
@@ -83,10 +83,10 @@ const jaJPGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'いずれか',
package/locales/koKR.js CHANGED
@@ -83,10 +83,10 @@ const koKRGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: '아무값',
package/locales/nbNO.js CHANGED
@@ -83,10 +83,10 @@ const nbNOGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'noen',
package/locales/plPL.js CHANGED
@@ -83,10 +83,10 @@ const plPLGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'dowolny',
package/locales/ptBR.js CHANGED
@@ -83,10 +83,10 @@ const ptBRGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'qualquer',
package/locales/roRO.js CHANGED
@@ -83,10 +83,10 @@ const roROGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'Aleatoriu',
package/locales/ruRU.js CHANGED
@@ -92,10 +92,10 @@ const ruRUGrid = {
92
92
  // headerFilterOperatorIsAnyOf: 'Is any of',
93
93
  // 'headerFilterOperator=': 'Equals',
94
94
  // 'headerFilterOperator!=': 'Not equals',
95
- // 'headerFilterOperator>': 'Is greater than',
96
- // 'headerFilterOperator>=': 'Is greater than or equal to',
97
- // 'headerFilterOperator<': 'Is less than',
98
- // 'headerFilterOperator<=': 'Is less than or equal to',
95
+ // 'headerFilterOperator>': 'Greater than',
96
+ // 'headerFilterOperator>=': 'Greater than or equal to',
97
+ // 'headerFilterOperator<': 'Less than',
98
+ // 'headerFilterOperator<=': 'Less than or equal to',
99
99
 
100
100
  // Filter values text
101
101
  filterValueAny: 'любой',
package/locales/skSK.js CHANGED
@@ -91,10 +91,10 @@ const skSKGrid = {
91
91
  // headerFilterOperatorIsAnyOf: 'Is any of',
92
92
  // 'headerFilterOperator=': 'Equals',
93
93
  // 'headerFilterOperator!=': 'Not equals',
94
- // 'headerFilterOperator>': 'Is greater than',
95
- // 'headerFilterOperator>=': 'Is greater than or equal to',
96
- // 'headerFilterOperator<': 'Is less than',
97
- // 'headerFilterOperator<=': 'Is less than or equal to',
94
+ // 'headerFilterOperator>': 'Greater than',
95
+ // 'headerFilterOperator>=': 'Greater than or equal to',
96
+ // 'headerFilterOperator<': 'Less than',
97
+ // 'headerFilterOperator<=': 'Less than or equal to',
98
98
 
99
99
  // Filter values text
100
100
  filterValueAny: 'akýkoľvek',
package/locales/svSE.js CHANGED
@@ -83,10 +83,10 @@ const svSEGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'något',
package/locales/trTR.js CHANGED
@@ -60,18 +60,17 @@ const trTRGrid = {
60
60
  filterOperatorIsEmpty: 'boş',
61
61
  filterOperatorIsNotEmpty: 'dolu',
62
62
  filterOperatorIsAnyOf: 'herhangi biri',
63
- // 'filterOperator=': '=',
64
- // 'filterOperator!=': '!=',
65
- // 'filterOperator>': '>',
66
- // 'filterOperator>=': '>=',
67
- // 'filterOperator<': '<',
68
- // 'filterOperator<=': '<=',
69
-
63
+ 'filterOperator=': '=',
64
+ 'filterOperator!=': '!=',
65
+ 'filterOperator>': '>',
66
+ 'filterOperator>=': '>=',
67
+ 'filterOperator<': '<',
68
+ 'filterOperator<=': '<=',
70
69
  // Header filter operators text
71
- // headerFilterOperatorContains: 'Contains',
72
- // headerFilterOperatorEquals: 'Equals',
73
- // headerFilterOperatorStartsWith: 'Starts with',
74
- // headerFilterOperatorEndsWith: 'Ends with',
70
+ headerFilterOperatorContains: 'Şunu içerir',
71
+ headerFilterOperatorEquals: 'Şuna eşittir',
72
+ headerFilterOperatorStartsWith: 'Şununla başlar',
73
+ headerFilterOperatorEndsWith: 'Şununla biter',
75
74
  // headerFilterOperatorIs: 'Is',
76
75
  // headerFilterOperatorNot: 'Is not',
77
76
  // headerFilterOperatorAfter: 'Is after',
@@ -83,10 +82,10 @@ const trTRGrid = {
83
82
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
83
  // 'headerFilterOperator=': 'Equals',
85
84
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
85
+ // 'headerFilterOperator>': 'Greater than',
86
+ // 'headerFilterOperator>=': 'Greater than or equal to',
87
+ // 'headerFilterOperator<': 'Less than',
88
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
89
 
91
90
  // Filter values text
92
91
  filterValueAny: 'herhangi',
@@ -96,9 +95,9 @@ const trTRGrid = {
96
95
  columnMenuLabel: 'Menü',
97
96
  columnMenuShowColumns: 'Sütunları göster',
98
97
  columnMenuManageColumns: 'Sütunları yönet',
99
- columnMenuFilter: 'Filtre uygula',
98
+ columnMenuFilter: 'Filtre Ekle',
100
99
  columnMenuHideColumn: 'Gizle',
101
- columnMenuUnsort: 'Sıralama',
100
+ columnMenuUnsort: 'Varsayılan Sıralama',
102
101
  columnMenuSortAsc: 'Sırala - Artan',
103
102
  columnMenuSortDesc: 'Sırala - Azalan',
104
103
  // Column header text
package/locales/ukUA.js CHANGED
@@ -97,10 +97,10 @@ const ukUAGrid = {
97
97
  // headerFilterOperatorIsAnyOf: 'Is any of',
98
98
  // 'headerFilterOperator=': 'Equals',
99
99
  // 'headerFilterOperator!=': 'Not equals',
100
- // 'headerFilterOperator>': 'Is greater than',
101
- // 'headerFilterOperator>=': 'Is greater than or equal to',
102
- // 'headerFilterOperator<': 'Is less than',
103
- // 'headerFilterOperator<=': 'Is less than or equal to',
100
+ // 'headerFilterOperator>': 'Greater than',
101
+ // 'headerFilterOperator>=': 'Greater than or equal to',
102
+ // 'headerFilterOperator<': 'Less than',
103
+ // 'headerFilterOperator<=': 'Less than or equal to',
104
104
 
105
105
  // Filter values text
106
106
  filterValueAny: 'будь-який',
package/locales/urPK.js CHANGED
@@ -83,10 +83,10 @@ const urPKGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'کوئی بھی',
package/locales/viVN.js CHANGED
@@ -83,10 +83,10 @@ const viVNGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: 'bất kỳ giá trị nào',
package/locales/zhCN.js CHANGED
@@ -83,10 +83,10 @@ const zhCNGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: '任何',
package/locales/zhTW.js CHANGED
@@ -83,10 +83,10 @@ const zhTWGrid = {
83
83
  // headerFilterOperatorIsAnyOf: 'Is any of',
84
84
  // 'headerFilterOperator=': 'Equals',
85
85
  // 'headerFilterOperator!=': 'Not equals',
86
- // 'headerFilterOperator>': 'Is greater than',
87
- // 'headerFilterOperator>=': 'Is greater than or equal to',
88
- // 'headerFilterOperator<': 'Is less than',
89
- // 'headerFilterOperator<=': 'Is less than or equal to',
86
+ // 'headerFilterOperator>': 'Greater than',
87
+ // 'headerFilterOperator>=': 'Greater than or equal to',
88
+ // 'headerFilterOperator<': 'Less than',
89
+ // 'headerFilterOperator<=': 'Less than or equal to',
90
90
 
91
91
  // Filter values text
92
92
  filterValueAny: '任何值',
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { GridEventPublisher, GridEventListener, GridEvents } from '../events';
3
+ import { Store } from '../../utils/Store';
3
4
  import { EventManager, EventListenerOptions } from '../../utils/EventManager';
4
5
  import { GridApiCaches } from '../gridApiCaches';
5
6
  import type { GridApiCommon, GridPrivateApiCommon } from './gridApiCommon';
@@ -34,6 +35,11 @@ export interface GridCoreApi {
34
35
  instanceId: {
35
36
  id: number;
36
37
  };
38
+ /**
39
+ * The pub/sub store containing a reference to the public state.
40
+ * @ignore - do not document.
41
+ */
42
+ store: Store<GridApiCommon['state']>;
37
43
  }
38
44
  export interface GridCorePrivateApi<GridPublicApi extends GridApiCommon, GridPrivateApi extends GridPrivateApiCommon> {
39
45
  /**
@@ -102,8 +102,9 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
102
102
  */
103
103
  sortComparator?: GridComparatorFn<V>;
104
104
  /**
105
- * Type allows to merge this object with a default definition [[GridColDef]].
105
+ * The type of the column.
106
106
  * @default 'string'
107
+ * @see See {@link https://mui.com/x/react-data-grid/column-definition/#column-types column types docs} for more details.
107
108
  */
108
109
  type?: GridColType;
109
110
  /**
@@ -230,7 +231,7 @@ export interface GridBaseColDef<R extends GridValidRowModel = GridValidRowModel,
230
231
  */
231
232
  export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
232
233
  /**
233
- * Type allows to merge this object with a default definition [[GridColDef]].
234
+ * The type of the column.
234
235
  * @default 'actions'
235
236
  */
236
237
  type: 'actions';
@@ -248,7 +249,7 @@ export interface GridActionsColDef<R extends GridValidRowModel = any, V = any, F
248
249
  */
249
250
  export interface GridSingleSelectColDef<R extends GridValidRowModel = any, V = any, F = V> extends GridBaseColDef<R, V, F> {
250
251
  /**
251
- * Type allows to merge this object with a default definition [[GridColDef]].
252
+ * The type of the column.
252
253
  * @default 'singleSelect'
253
254
  */
254
255
  type: 'singleSelect';
@@ -1,2 +1,4 @@
1
+ type LiteralUnion<LiteralType, BaseType> = LiteralType | (BaseType & Record<never, never>);
1
2
  export type GridNativeColTypes = 'string' | 'number' | 'date' | 'dateTime' | 'boolean' | 'singleSelect' | 'actions';
2
- export type GridColType = GridNativeColTypes | string;
3
+ export type GridColType = LiteralUnion<GridNativeColTypes, string>;
4
+ export {};
@@ -214,6 +214,14 @@ export interface GridHeaderFilterEventLookup {
214
214
  params: GridColumnHeaderParams;
215
215
  event: React.KeyboardEvent<HTMLElement>;
216
216
  };
217
+ /**
218
+ * Fired when a column header filter is blurred.
219
+ * @ignore - do not document.
220
+ */
221
+ headerFilterBlur: {
222
+ params: GridColumnHeaderParams;
223
+ event: React.KeyboardEvent<HTMLElement>;
224
+ };
217
225
  }
218
226
  export interface GridColumnGroupHeaderEventLookup {
219
227
  /**
@@ -555,20 +563,20 @@ export interface GridEventLookup extends GridRowEventLookup, GridColumnHeaderEve
555
563
  event: React.TouchEvent;
556
564
  };
557
565
  /**
558
- * Fired when the value of the selection checkbox of the header is changed
566
+ * Fired when the value of the selection checkbox of the header is changed.
559
567
  */
560
568
  headerSelectionCheckboxChange: {
561
569
  params: GridHeaderSelectionCheckboxParams;
562
570
  };
563
571
  /**
564
- * Fired when the value of the selection checkbox of a row is changed
572
+ * Fired when the value of the selection checkbox of a row is changed.
565
573
  */
566
574
  rowSelectionCheckboxChange: {
567
575
  params: GridRowSelectionCheckboxParams;
568
576
  event: React.ChangeEvent<HTMLElement>;
569
577
  };
570
578
  /**
571
- * Fired when the data is copied to the clipboard
579
+ * Fired when the data is copied to the clipboard.
572
580
  */
573
581
  clipboardCopy: {
574
582
  params: string;
@@ -3,6 +3,7 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  const _excluded = ["innerRef", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnPositions", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "densityFactor", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
+ import { fastMemo } from '../utils/fastMemo';
6
7
  import { useGridColumnHeaders } from '../hooks/features/columnHeaders/useGridColumnHeaders';
7
8
  import { GridBaseColumnHeaders } from './columnHeaders/GridBaseColumnHeaders';
8
9
  import { GridColumnHeadersInner } from './columnHeaders/GridColumnHeadersInner';
@@ -100,4 +101,5 @@ process.env.NODE_ENV !== "production" ? GridColumnHeaders.propTypes = {
100
101
  sortColumnLookup: PropTypes.object.isRequired,
101
102
  visibleColumns: PropTypes.arrayOf(PropTypes.object).isRequired
102
103
  } : void 0;
103
- export { GridColumnHeaders };
104
+ const MemoizedGridColumnHeaders = fastMemo(GridColumnHeaders);
105
+ export { MemoizedGridColumnHeaders as GridColumnHeaders };
@@ -1,17 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"],
4
- _excluded2 = ["changeReason", "unstable_updateValueOnRender"];
3
+ const _excluded = ["selected", "rowId", "row", "index", "style", "position", "rowHeight", "className", "visibleColumns", "renderedColumns", "containerWidth", "firstColumnToRender", "lastColumnToRender", "isLastVisible", "focusedCell", "tabbableCell", "onClick", "onDoubleClick", "onMouseEnter", "onMouseLeave"];
5
4
  import * as React from 'react';
6
5
  import PropTypes from 'prop-types';
7
6
  import clsx from 'clsx';
8
7
  import { unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';
8
+ import { fastMemo } from '../utils/fastMemo';
9
9
  import { GridEditModes, GridRowModes, GridCellModes } from '../models/gridEditRowModel';
10
10
  import { useGridApiContext } from '../hooks/utils/useGridApiContext';
11
11
  import { getDataGridUtilityClass, gridClasses } from '../constants/gridClasses';
12
12
  import { useGridRootProps } from '../hooks/utils/useGridRootProps';
13
13
  import { gridColumnsTotalWidthSelector } from '../hooks/features/columns/gridColumnsSelector';
14
- import { useGridSelector } from '../hooks/utils/useGridSelector';
14
+ import { useGridSelector, objectShallowCompare } from '../hooks/utils/useGridSelector';
15
15
  import { useGridVisibleRows } from '../hooks/utils/useGridVisibleRows';
16
16
  import { findParentElementFromClassName } from '../utils/domUtils';
17
17
  import { GRID_CHECKBOX_SELECTION_COL_DEF } from '../colDef/gridCheckboxSelectionColDef';
@@ -21,6 +21,7 @@ import { gridSortModelSelector } from '../hooks/features/sorting/gridSortingSele
21
21
  import { gridRowMaximumTreeDepthSelector } from '../hooks/features/rows/gridRowsSelector';
22
22
  import { gridColumnGroupsHeaderMaxDepthSelector } from '../hooks/features/columnGrouping/gridColumnGroupsSelector';
23
23
  import { randomNumberBetween } from '../utils/utils';
24
+ import { GridCellWrapper, GridCellV7 } from './cell/GridCell';
24
25
  import { gridEditRowsStateSelector } from '../hooks/features/editing/gridEditingSelectors';
25
26
  import { jsx as _jsx } from "react/jsx-runtime";
26
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -67,8 +68,6 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
67
68
  containerWidth,
68
69
  firstColumnToRender,
69
70
  isLastVisible = false,
70
- focusedCell,
71
- tabbableCell,
72
71
  onClick,
73
72
  onDoubleClick,
74
73
  onMouseEnter,
@@ -183,78 +182,27 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
183
182
  const {
184
183
  slots,
185
184
  slotProps,
186
- classes: rootClasses,
187
- disableColumnReorder,
188
- getCellClassName
185
+ disableColumnReorder
189
186
  } = rootProps;
187
+ const CellComponent = slots.cell === GridCellV7 ? GridCellV7 : GridCellWrapper;
190
188
  const rowReordering = rootProps.rowReordering;
191
- const CellComponent = slots.cell;
192
- const getCell = React.useCallback((column, cellProps) => {
193
- const cellParams = apiRef.current.getCellParams(rowId, column.field);
194
- const classNames = apiRef.current.unstable_applyPipeProcessors('cellClassName', [], {
195
- id: rowId,
196
- field: column.field
197
- });
189
+ const getCell = (column, cellProps) => {
198
190
  const disableDragEvents = disableColumnReorder && column.disableReorder || !rowReordering && !!sortModel.length && treeDepth > 1 && Object.keys(editRowsState).length > 0;
199
- if (column.cellClassName) {
200
- classNames.push(clsx(typeof column.cellClassName === 'function' ? column.cellClassName(cellParams) : column.cellClassName));
201
- }
202
- const editCellState = editRowsState[rowId] ? editRowsState[rowId][column.field] : null;
203
- let content;
204
- if (editCellState == null && column.renderCell) {
205
- content = column.renderCell(_extends({}, cellParams, {
206
- api: apiRef.current
207
- }));
208
- // TODO move to GridCell
209
- classNames.push(clsx(gridClasses['cell--withRenderer'], rootClasses?.['cell--withRenderer']));
210
- }
211
- if (editCellState != null && column.renderEditCell) {
212
- const updatedRow = apiRef.current.getRowWithUpdatedValues(rowId, column.field);
213
-
214
- // eslint-disable-next-line @typescript-eslint/naming-convention
215
- const editCellStateRest = _objectWithoutPropertiesLoose(editCellState, _excluded2);
216
- const params = _extends({}, cellParams, {
217
- row: updatedRow
218
- }, editCellStateRest, {
219
- api: apiRef.current
220
- });
221
- content = column.renderEditCell(params);
222
- // TODO move to GridCell
223
- classNames.push(clsx(gridClasses['cell--editing'], rootClasses?.['cell--editing']));
224
- }
225
- if (getCellClassName) {
226
- // TODO move to GridCell
227
- classNames.push(getCellClassName(cellParams));
228
- }
229
- const hasFocus = focusedCell === column.field;
230
- const tabIndex = tabbableCell === column.field ? 0 : -1;
231
- const isSelected = apiRef.current.unstable_applyPipeProcessors('isCellSelected', false, {
232
- id: rowId,
233
- field: column.field
234
- });
191
+ const editCellState = editRowsState[rowId]?.[column.field] ?? null;
235
192
  return /*#__PURE__*/_jsx(CellComponent, _extends({
236
- value: cellParams.value,
237
- field: column.field,
193
+ column: column,
238
194
  width: cellProps.width,
239
195
  rowId: rowId,
240
196
  height: rowHeight,
241
197
  showRightBorder: cellProps.showRightBorder,
242
- formattedValue: cellParams.formattedValue,
243
198
  align: column.align || 'left',
244
- cellMode: cellParams.cellMode,
245
199
  colIndex: cellProps.indexRelativeToAllColumns,
246
- isEditable: cellParams.isEditable,
247
- isSelected: isSelected,
248
- hasFocus: hasFocus,
249
- tabIndex: tabIndex,
250
- className: clsx(classNames),
251
200
  colSpan: cellProps.colSpan,
252
- disableDragEvents: disableDragEvents
253
- }, slotProps?.cell, {
254
- children: content
255
- }), column.field);
256
- }, [apiRef, rowId, disableColumnReorder, rowReordering, sortModel.length, treeDepth, editRowsState, getCellClassName, focusedCell, tabbableCell, CellComponent, rowHeight, slotProps?.cell, rootClasses]);
257
- const sizes = apiRef.current.unstable_getRowInternalSizes(rowId);
201
+ disableDragEvents: disableDragEvents,
202
+ editCellState: editCellState
203
+ }, slotProps?.cell), column.field);
204
+ };
205
+ const sizes = useGridSelector(apiRef, () => _extends({}, apiRef.current.unstable_getRowInternalSizes(rowId)), objectShallowCompare);
258
206
  let minHeight = rowHeight;
259
207
  if (minHeight === 'auto' && sizes) {
260
208
  let numberOfBaseSizes = 0;
@@ -303,7 +251,11 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
303
251
  rowClassNames.push(rootProps.getRowClassName(rowParams));
304
252
  }
305
253
  const randomNumber = randomNumberBetween(10000, 20, 80);
306
- const rowType = apiRef.current.getRowNode(rowId).type;
254
+ const rowNode = apiRef.current.getRowNode(rowId);
255
+ if (!rowNode) {
256
+ return null;
257
+ }
258
+ const rowType = rowNode.type;
307
259
  const cells = [];
308
260
  for (let i = 0; i < renderedColumns.length; i += 1) {
309
261
  const column = renderedColumns[i];
@@ -327,7 +279,7 @@ const GridRow = /*#__PURE__*/React.forwardRef(function GridRow(props, refProp) {
327
279
  width
328
280
  } = cellColSpanInfo.cellProps;
329
281
  const contentWidth = Math.round(randomNumber());
330
- cells.push( /*#__PURE__*/_jsx(rootProps.slots.skeletonCell, {
282
+ cells.push( /*#__PURE__*/_jsx(slots.skeletonCell, {
331
283
  width: width,
332
284
  contentWidth: contentWidth,
333
285
  field: column.field,
@@ -394,4 +346,5 @@ process.env.NODE_ENV !== "production" ? GridRow.propTypes = {
394
346
  tabbableCell: PropTypes.string,
395
347
  visibleColumns: PropTypes.arrayOf(PropTypes.object)
396
348
  } : void 0;
397
- export { GridRow };
349
+ const MemoizedGridRow = fastMemo(GridRow);
350
+ export { MemoizedGridRow as GridRow };