@mui/x-data-grid 5.12.2 → 5.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG.md +160 -6
  2. package/DataGrid/DataGrid.js +4 -4
  3. package/colDef/gridDateOperators.js +4 -2
  4. package/colDef/gridNumericOperators.js +4 -2
  5. package/colDef/gridStringOperators.d.ts +1 -1
  6. package/colDef/gridStringOperators.js +15 -8
  7. package/components/GridRow.js +1 -1
  8. package/components/cell/GridActionsCellItem.d.ts +2 -2
  9. package/components/cell/GridBooleanCell.js +4 -3
  10. package/components/cell/GridEditBooleanCell.js +4 -3
  11. package/components/cell/GridEditDateCell.js +4 -3
  12. package/components/cell/GridEditInputCell.js +4 -3
  13. package/components/cell/GridEditSingleSelectCell.js +9 -7
  14. package/components/panel/GridColumnsPanel.js +1 -1
  15. package/components/panel/GridPanel.d.ts +1 -1
  16. package/components/panel/filterPanel/GridFilterForm.js +11 -4
  17. package/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  18. package/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  19. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +5 -9
  20. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +42 -19
  21. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +3 -7
  22. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +32 -14
  23. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  24. package/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  25. package/components/panel/filterPanel/GridFilterInputValueProps.d.ts +6 -3
  26. package/components/panel/filterPanel/filterPanelUtils.d.ts +1 -1
  27. package/components/toolbar/GridToolbarColumnsButton.d.ts +1 -1
  28. package/components/toolbar/GridToolbarDensitySelector.d.ts +1 -1
  29. package/components/toolbar/GridToolbarExportContainer.d.ts +1 -1
  30. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  31. package/hooks/features/dimensions/useGridDimensions.js +28 -15
  32. package/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  33. package/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  34. package/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  35. package/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  36. package/hooks/features/filter/gridFilterUtils.js +8 -5
  37. package/hooks/features/filter/useGridFilter.js +19 -1
  38. package/hooks/features/rows/useGridRows.js +16 -3
  39. package/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  40. package/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
  41. package/hooks/utils/useGridApiContext.js +1 -1
  42. package/hooks/utils/useGridRootProps.js +1 -1
  43. package/index.js +1 -1
  44. package/legacy/DataGrid/DataGrid.js +4 -4
  45. package/legacy/colDef/gridDateOperators.js +4 -2
  46. package/legacy/colDef/gridNumericOperators.js +4 -2
  47. package/legacy/colDef/gridStringOperators.js +17 -7
  48. package/legacy/components/GridRow.js +1 -1
  49. package/legacy/components/cell/GridBooleanCell.js +3 -1
  50. package/legacy/components/cell/GridEditBooleanCell.js +4 -2
  51. package/legacy/components/cell/GridEditDateCell.js +4 -2
  52. package/legacy/components/cell/GridEditInputCell.js +4 -2
  53. package/legacy/components/cell/GridEditSingleSelectCell.js +9 -7
  54. package/legacy/components/panel/GridColumnsPanel.js +3 -1
  55. package/legacy/components/panel/filterPanel/GridFilterForm.js +9 -4
  56. package/legacy/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  57. package/legacy/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  58. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +34 -12
  59. package/legacy/components/panel/filterPanel/GridFilterInputMultipleValue.js +24 -7
  60. package/legacy/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  61. package/legacy/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  62. package/legacy/hooks/features/dimensions/useGridDimensions.js +27 -15
  63. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  64. package/legacy/hooks/features/editRows/useGridCellEditing.old.js +16 -8
  65. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  66. package/legacy/hooks/features/editRows/useGridRowEditing.old.js +22 -14
  67. package/legacy/hooks/features/filter/gridFilterUtils.js +8 -5
  68. package/legacy/hooks/features/filter/useGridFilter.js +19 -1
  69. package/legacy/hooks/features/rows/useGridRows.js +18 -3
  70. package/legacy/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  71. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +19 -8
  72. package/legacy/hooks/utils/useGridApiContext.js +1 -1
  73. package/legacy/hooks/utils/useGridRootProps.js +1 -1
  74. package/legacy/index.js +1 -1
  75. package/legacy/locales/deDE.js +4 -4
  76. package/legacy/locales/frFR.js +11 -11
  77. package/legacy/locales/index.js +3 -0
  78. package/legacy/locales/nlNL.js +15 -15
  79. package/legacy/locales/ptBR.js +11 -11
  80. package/legacy/locales/roRO.js +128 -0
  81. package/legacy/locales/skSK.js +16 -16
  82. package/legacy/locales/svSE.js +128 -0
  83. package/legacy/utils/keyboardUtils.js +4 -3
  84. package/locales/deDE.js +4 -4
  85. package/locales/frFR.js +11 -11
  86. package/locales/index.d.ts +3 -0
  87. package/locales/index.js +3 -0
  88. package/locales/nlNL.js +15 -15
  89. package/locales/ptBR.js +11 -11
  90. package/locales/roRO.d.ts +2 -0
  91. package/locales/roRO.js +116 -0
  92. package/locales/skSK.js +16 -16
  93. package/locales/svSE.d.ts +2 -0
  94. package/locales/svSE.js +116 -0
  95. package/models/gridFilterOperator.d.ts +6 -0
  96. package/modern/DataGrid/DataGrid.js +4 -4
  97. package/modern/colDef/gridDateOperators.js +4 -2
  98. package/modern/colDef/gridNumericOperators.js +4 -2
  99. package/modern/colDef/gridStringOperators.js +15 -8
  100. package/modern/components/GridRow.js +1 -1
  101. package/modern/components/cell/GridBooleanCell.js +4 -3
  102. package/modern/components/cell/GridEditBooleanCell.js +4 -3
  103. package/modern/components/cell/GridEditDateCell.js +4 -3
  104. package/modern/components/cell/GridEditInputCell.js +4 -3
  105. package/modern/components/cell/GridEditSingleSelectCell.js +9 -7
  106. package/modern/components/panel/GridColumnsPanel.js +1 -1
  107. package/modern/components/panel/filterPanel/GridFilterForm.js +11 -4
  108. package/modern/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  109. package/modern/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  110. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +32 -13
  111. package/modern/components/panel/filterPanel/GridFilterInputMultipleValue.js +22 -8
  112. package/modern/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  113. package/modern/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  114. package/modern/hooks/features/dimensions/useGridDimensions.js +28 -15
  115. package/modern/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  116. package/modern/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  117. package/modern/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  118. package/modern/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  119. package/modern/hooks/features/filter/gridFilterUtils.js +8 -5
  120. package/modern/hooks/features/filter/useGridFilter.js +17 -1
  121. package/modern/hooks/features/rows/useGridRows.js +16 -3
  122. package/modern/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  123. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +10 -3
  124. package/modern/hooks/utils/useGridApiContext.js +1 -1
  125. package/modern/hooks/utils/useGridRootProps.js +1 -1
  126. package/modern/index.js +1 -1
  127. package/modern/locales/deDE.js +4 -4
  128. package/modern/locales/frFR.js +11 -11
  129. package/modern/locales/index.js +3 -0
  130. package/modern/locales/nlNL.js +15 -15
  131. package/modern/locales/ptBR.js +11 -11
  132. package/modern/locales/roRO.js +116 -0
  133. package/modern/locales/skSK.js +16 -16
  134. package/modern/locales/svSE.js +116 -0
  135. package/modern/utils/keyboardUtils.js +4 -3
  136. package/node/DataGrid/DataGrid.js +4 -4
  137. package/node/colDef/gridDateOperators.js +4 -2
  138. package/node/colDef/gridNumericOperators.js +4 -2
  139. package/node/colDef/gridStringOperators.js +15 -8
  140. package/node/components/GridRow.js +1 -1
  141. package/node/components/cell/GridBooleanCell.js +5 -3
  142. package/node/components/cell/GridEditBooleanCell.js +5 -3
  143. package/node/components/cell/GridEditDateCell.js +5 -3
  144. package/node/components/cell/GridEditInputCell.js +5 -3
  145. package/node/components/cell/GridEditSingleSelectCell.js +10 -7
  146. package/node/components/panel/GridColumnsPanel.js +1 -1
  147. package/node/components/panel/filterPanel/GridFilterForm.js +9 -4
  148. package/node/components/panel/filterPanel/GridFilterInputBoolean.js +1 -1
  149. package/node/components/panel/filterPanel/GridFilterInputDate.js +4 -2
  150. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +43 -20
  151. package/node/components/panel/filterPanel/GridFilterInputMultipleValue.js +33 -15
  152. package/node/components/panel/filterPanel/GridFilterInputSingleSelect.js +8 -2
  153. package/node/components/panel/filterPanel/GridFilterInputValue.js +4 -2
  154. package/node/hooks/features/dimensions/useGridDimensions.js +28 -15
  155. package/node/hooks/features/editRows/useGridCellEditing.new.js +7 -1
  156. package/node/hooks/features/editRows/useGridCellEditing.old.js +6 -0
  157. package/node/hooks/features/editRows/useGridRowEditing.new.js +7 -1
  158. package/node/hooks/features/editRows/useGridRowEditing.old.js +6 -0
  159. package/node/hooks/features/filter/gridFilterUtils.js +7 -4
  160. package/node/hooks/features/filter/useGridFilter.js +19 -1
  161. package/node/hooks/features/rows/useGridRows.js +16 -3
  162. package/node/hooks/features/rows/useGridRowsPreProcessors.js +1 -1
  163. package/node/hooks/features/virtualization/useGridVirtualScroller.js +14 -3
  164. package/node/hooks/utils/useGridApiContext.js +1 -1
  165. package/node/hooks/utils/useGridRootProps.js +1 -1
  166. package/node/index.js +1 -1
  167. package/node/locales/deDE.js +4 -4
  168. package/node/locales/frFR.js +11 -11
  169. package/node/locales/index.js +39 -0
  170. package/node/locales/nlNL.js +15 -15
  171. package/node/locales/ptBR.js +11 -11
  172. package/node/locales/roRO.js +126 -0
  173. package/node/locales/skSK.js +16 -16
  174. package/node/locales/svSE.js +126 -0
  175. package/node/utils/keyboardUtils.js +4 -3
  176. package/package.json +4 -4
  177. package/utils/keyboardUtils.js +4 -3
@@ -10,5 +10,5 @@ export interface GridToolbarFilterButtonProps extends Omit<TooltipProps, 'title'
10
10
  button?: ButtonProps;
11
11
  };
12
12
  }
13
- declare const GridToolbarFilterButton: React.ForwardRefExoticComponent<Pick<GridToolbarFilterButtonProps, "hidden" | "color" | "style" | "open" | "translate" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onClose" | "sx" | "classes" | "components" | "componentsProps" | "TransitionComponent" | "TransitionProps" | "onOpen" | "placement" | "arrow" | "describeChild" | "disableFocusListener" | "disableHoverListener" | "disableInteractive" | "disableTouchListener" | "enterDelay" | "enterNextDelay" | "enterTouchDelay" | "followCursor" | "leaveDelay" | "leaveTouchDelay" | "PopperComponent" | "PopperProps"> & React.RefAttributes<HTMLButtonElement>>;
13
+ declare const GridToolbarFilterButton: React.ForwardRefExoticComponent<Pick<GridToolbarFilterButtonProps, "hidden" | "color" | "style" | "open" | "translate" | "slot" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onClose" | "sx" | "classes" | "components" | "placement" | "arrow" | "componentsProps" | "TransitionComponent" | "TransitionProps" | "onOpen" | "describeChild" | "disableFocusListener" | "disableHoverListener" | "disableInteractive" | "disableTouchListener" | "enterDelay" | "enterNextDelay" | "enterTouchDelay" | "followCursor" | "leaveDelay" | "leaveTouchDelay" | "PopperComponent" | "PopperProps"> & React.RefAttributes<HTMLButtonElement>>;
14
14
  export { GridToolbarFilterButton };
@@ -71,21 +71,34 @@ export function useGridDimensions(apiRef, props) {
71
71
  rootElement.removeChild(scrollDiv);
72
72
  }
73
73
 
74
- const viewportOuterSize = {
75
- width: rootDimensionsRef.current.width,
76
- height: props.autoHeight ? rowsMeta.currentPageTotalHeight : rootDimensionsRef.current.height - headerHeight
77
- };
78
- const {
79
- hasScrollX,
80
- hasScrollY
81
- } = hasScroll({
82
- content: {
83
- width: Math.round(columnsTotalWidth),
84
- height: rowsMeta.currentPageTotalHeight
85
- },
86
- container: viewportOuterSize,
87
- scrollBarSize
88
- });
74
+ let viewportOuterSize;
75
+ let hasScrollX;
76
+ let hasScrollY;
77
+
78
+ if (props.autoHeight) {
79
+ hasScrollY = false;
80
+ hasScrollX = Math.round(columnsTotalWidth) > rootDimensionsRef.current.width;
81
+ viewportOuterSize = {
82
+ width: rootDimensionsRef.current.width,
83
+ height: rowsMeta.currentPageTotalHeight + (hasScrollX ? scrollBarSize : 0)
84
+ };
85
+ } else {
86
+ viewportOuterSize = {
87
+ width: rootDimensionsRef.current.width,
88
+ height: rootDimensionsRef.current.height - headerHeight
89
+ };
90
+ const scrollInformation = hasScroll({
91
+ content: {
92
+ width: Math.round(columnsTotalWidth),
93
+ height: rowsMeta.currentPageTotalHeight
94
+ },
95
+ container: viewportOuterSize,
96
+ scrollBarSize
97
+ });
98
+ hasScrollY = scrollInformation.hasScrollY;
99
+ hasScrollX = scrollInformation.hasScrollX;
100
+ }
101
+
89
102
  const viewportInnerSize = {
90
103
  width: viewportOuterSize.width - (hasScrollY ? scrollBarSize : 0),
91
104
  height: viewportOuterSize.height - (hasScrollX ? scrollBarSize : 0)
@@ -70,6 +70,12 @@ export const useGridCellEditing = (apiRef, props) => {
70
70
  }, [apiRef]);
71
71
  const handleCellKeyDown = React.useCallback((params, event) => {
72
72
  if (params.cellMode === GridCellModes.Edit) {
73
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
74
+ // TODO: `event.which` is depricated but this is a temporary workaround
75
+ if (event.which === 229) {
76
+ return;
77
+ }
78
+
73
79
  let reason;
74
80
 
75
81
  if (event.key === 'Escape') {
@@ -92,7 +98,7 @@ export const useGridCellEditing = (apiRef, props) => {
92
98
  let reason;
93
99
 
94
100
  if (isPrintableKey(event.key)) {
95
- if (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) {
101
+ if (event.ctrlKey && event.key !== 'v' || event.metaKey && event.key !== 'v' || event.altKey) {
96
102
  return;
97
103
  }
98
104
 
@@ -179,6 +179,12 @@ export const useCellEditing = (apiRef, props) => {
179
179
  };
180
180
  useGridApiMethod(apiRef, cellEditingApi, 'EditRowApi');
181
181
  const handleCellKeyDown = React.useCallback(async (params, event) => {
182
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
183
+ // TODO: `event.which` is depricated but this is a temporary workaround
184
+ if (event.which === 229) {
185
+ return;
186
+ }
187
+
182
188
  const {
183
189
  id,
184
190
  field,
@@ -110,6 +110,12 @@ export const useGridRowEditing = (apiRef, props) => {
110
110
  }, []);
111
111
  const handleCellKeyDown = React.useCallback((params, event) => {
112
112
  if (params.cellMode === GridRowModes.Edit) {
113
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
114
+ // TODO: `event.which` is depricated but this is a temporary workaround
115
+ if (event.which === 229) {
116
+ return;
117
+ }
118
+
113
119
  let reason;
114
120
 
115
121
  if (event.key === 'Escape') {
@@ -148,7 +154,7 @@ export const useGridRowEditing = (apiRef, props) => {
148
154
  let reason;
149
155
 
150
156
  if (isPrintableKey(event.key)) {
151
- if (event.shiftKey || event.ctrlKey || event.metaKey || event.altKey) {
157
+ if (event.ctrlKey && event.key !== 'v' || event.metaKey && event.key !== 'v' || event.altKey) {
152
158
  return;
153
159
  }
154
160
 
@@ -176,6 +176,12 @@ export const useGridRowEditing = (apiRef, props) => {
176
176
  };
177
177
  useGridApiMethod(apiRef, rowEditingApi, 'EditRowApi');
178
178
  const handleCellKeyDown = React.useCallback(async (params, event) => {
179
+ // Wait until IME is settled for Asian languages like Japanese and Chinese
180
+ // TODO: `event.which` is depricated but this is a temporary workaround
181
+ if (event.which === 229) {
182
+ return;
183
+ }
184
+
179
185
  const {
180
186
  cellMode,
181
187
  isEditable
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { GridLinkOperator } from '../../../models';
3
3
  import { buildWarning } from '../../../utils/warning';
4
- import { gridColumnFieldsSelector } from '../columns';
4
+ import { gridColumnFieldsSelector, gridColumnLookupSelector } from '../columns';
5
5
 
6
6
  /**
7
7
  * Adds default values to the optional fields of a filter items.
@@ -18,8 +18,9 @@ export const cleanFilterItem = (item, apiRef) => {
18
18
  }
19
19
 
20
20
  if (cleanItem.operatorValue == null) {
21
- // we select a default operator
22
- const column = apiRef.current.getColumn(cleanItem.columnField);
21
+ // Selects a default operator
22
+ // We don't use `apiRef.current.getColumn` because it is not ready during state initialization
23
+ const column = gridColumnLookupSelector(apiRef)[cleanItem.columnField];
23
24
  cleanItem.operatorValue = column && column.filterOperators[0].value;
24
25
  }
25
26
 
@@ -185,14 +186,16 @@ export const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
185
186
  const sanitizedQuickFilterValues = quickFilterValues.filter((value, index) => Object.keys(appliersPerColumnField).some(field => appliersPerColumnField[field][index] != null));
186
187
  return (rowId, shouldApplyFilter) => {
187
188
  const usedCellParams = {};
189
+ const columnsFieldsToFilter = [];
188
190
  Object.keys(appliersPerColumnField).forEach(columnField => {
189
191
  if (!shouldApplyFilter || shouldApplyFilter(columnField)) {
190
192
  usedCellParams[columnField] = apiRef.current.getCellParams(rowId, columnField);
193
+ columnsFieldsToFilter.push(columnField);
191
194
  }
192
195
  }); // Return `false` as soon as we have a quick filter value that does not match any column
193
196
 
194
197
  if (quickFilterLogicOperator === GridLinkOperator.And) {
195
- return sanitizedQuickFilterValues.every((value, index) => Object.keys(appliersPerColumnField).some(field => {
198
+ return sanitizedQuickFilterValues.every((value, index) => columnsFieldsToFilter.some(field => {
196
199
  var _appliersPerColumnFie, _appliersPerColumnFie2;
197
200
 
198
201
  if (appliersPerColumnField[field][index] == null) {
@@ -204,7 +207,7 @@ export const buildAggregatedQuickFilterApplier = (filterModel, apiRef) => {
204
207
  } // Return `true` as soon as we have have a quick filter value that match any column
205
208
 
206
209
 
207
- return sanitizedQuickFilterValues.some((value, index) => Object.keys(appliersPerColumnField).some(field => {
210
+ return sanitizedQuickFilterValues.some((value, index) => columnsFieldsToFilter.some(field => {
208
211
  var _appliersPerColumnFie3, _appliersPerColumnFie4;
209
212
 
210
213
  if (appliersPerColumnField[field][index] == null) {
@@ -113,7 +113,25 @@ export const useGridFilter = (apiRef, props) => {
113
113
 
114
114
  if (targetColumnField) {
115
115
  const filterModel = gridFilterModelSelector(apiRef);
116
- const filterItemsWithValue = filterModel.items.filter(item => item.value !== undefined);
116
+ const filterItemsWithValue = filterModel.items.filter(item => {
117
+ var _column$filterOperato;
118
+
119
+ if (item.value !== undefined) {
120
+ return true;
121
+ }
122
+
123
+ const column = apiRef.current.getColumn(item.columnField);
124
+ const filterOperator = (_column$filterOperato = column.filterOperators) == null ? void 0 : _column$filterOperato.find(operator => operator.value === item.operatorValue);
125
+ const requiresFilterValue = typeof (filterOperator == null ? void 0 : filterOperator.requiresFilterValue) === 'undefined' ? true : filterOperator == null ? void 0 : filterOperator.requiresFilterValue; // Operators like `isEmpty` don't have and don't require `item.value`.
126
+ // So we don't want to remove them from the filter model if `item.value === undefined`.
127
+ // See https://github.com/mui/mui-x/issues/5402
128
+
129
+ if (requiresFilterValue) {
130
+ return false;
131
+ }
132
+
133
+ return true;
134
+ });
117
135
  let newFilterItems;
118
136
  const filterItemOnTarget = filterItemsWithValue.find(item => item.columnField === targetColumnField);
119
137
 
@@ -97,7 +97,7 @@ export const useGridRows = (apiRef, props) => {
97
97
  const updateRows = React.useCallback(updates => {
98
98
  if (props.signature === GridSignature.DataGrid && updates.length > 1) {
99
99
  // TODO: Add test with direct call to `apiRef.current.updateRows` in DataGrid after enabling the `apiRef` on the free plan.
100
- 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'));
100
+ 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'));
101
101
  } // we remove duplicate updates. A server can batch updates, and send several updates for the same row in one fn call.
102
102
 
103
103
 
@@ -323,10 +323,23 @@ export const useGridRows = (apiRef, props) => {
323
323
  if (isFirstRender.current) {
324
324
  isFirstRender.current = false;
325
325
  return;
326
- } // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
326
+ }
327
+
328
+ const areNewRowsAlreadyInState = apiRef.current.unstable_caches.rows.rowsBeforePartialUpdates === props.rows;
329
+ const isNewLoadingAlreadyInState = apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading; // The new rows have already been applied (most likely in the `'rowGroupsPreProcessingChange'` listener)
327
330
 
331
+ if (areNewRowsAlreadyInState) {
332
+ // If the loading prop has changed, we need to update its value in the state because it won't be done by `throttledRowsChange`
333
+ if (!isNewLoadingAlreadyInState) {
334
+ apiRef.current.setState(state => _extends({}, state, {
335
+ rows: _extends({}, state.rows, {
336
+ loading: props.loading
337
+ })
338
+ }));
339
+ apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates = props.loading;
340
+ apiRef.current.forceUpdate();
341
+ }
328
342
 
329
- if (apiRef.current.unstable_caches.rows.rowsBeforePartialUpdates === props.rows && apiRef.current.unstable_caches.rows.loadingPropBeforePartialUpdates === props.loading) {
330
343
  return;
331
344
  }
332
345
 
@@ -11,7 +11,7 @@ const flatRowTreeCreationMethod = ({
11
11
  for (let i = 0; i < ids.length; i += 1) {
12
12
  const rowId = ids[i];
13
13
 
14
- if (previousTree && previousTree[rowId]) {
14
+ if (previousTree && previousTree[rowId] && previousTree[rowId].depth === 0 && previousTree[rowId].parent == null) {
15
15
  tree[rowId] = previousTree[rowId];
16
16
  } else {
17
17
  tree[rowId] = {
@@ -54,6 +54,8 @@ export const getRenderableIndexes = ({
54
54
  return [clamp(firstIndex - buffer, minFirstIndex, maxLastIndex), clamp(lastIndex + buffer, minFirstIndex, maxLastIndex)];
55
55
  };
56
56
  export const useGridVirtualScroller = props => {
57
+ var _currentPage$range3, _currentPage$range4;
58
+
57
59
  const apiRef = useGridApiContext();
58
60
  const rootProps = useGridRootProps();
59
61
  const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
@@ -86,8 +88,17 @@ export const useGridVirtualScroller = props => {
86
88
  const [containerWidth, setContainerWidth] = React.useState(null);
87
89
  const prevTotalWidth = React.useRef(columnsTotalWidth);
88
90
  const getNearestIndexToRender = React.useCallback(offset => {
89
- const lastMeasuredIndex = Math.max(0, apiRef.current.unstable_getLastMeasuredRowIndex());
90
- const allRowsMeasured = lastMeasuredIndex === Infinity;
91
+ var _currentPage$range, _currentPage$range2;
92
+
93
+ const lastMeasuredIndexRelativeToAllRows = apiRef.current.unstable_getLastMeasuredRowIndex();
94
+ const lastMeasuredIndexRelativeToCurrentPage = lastMeasuredIndexRelativeToAllRows - (((_currentPage$range = currentPage.range) == null ? void 0 : _currentPage$range.firstRowIndex) || 0);
95
+ const lastMeasuredIndex = Math.max(0, lastMeasuredIndexRelativeToCurrentPage);
96
+ let allRowsMeasured = lastMeasuredIndex === Infinity;
97
+
98
+ if ((_currentPage$range2 = currentPage.range) != null && _currentPage$range2.lastRowIndex && !allRowsMeasured) {
99
+ // Check if all rows in this page are already measured
100
+ allRowsMeasured = lastMeasuredIndex >= currentPage.range.lastRowIndex;
101
+ }
91
102
 
92
103
  if (allRowsMeasured || rowsMeta.positions[lastMeasuredIndex] >= offset) {
93
104
  // If all rows were measured (when no row has "auto" as height) or all rows before the offset
@@ -100,7 +111,7 @@ export const useGridVirtualScroller = props => {
100
111
 
101
112
 
102
113
  return exponentialSearch(offset, rowsMeta.positions, lastMeasuredIndex);
103
- }, [apiRef, rowsMeta.positions]);
114
+ }, [apiRef, (_currentPage$range3 = currentPage.range) == null ? void 0 : _currentPage$range3.firstRowIndex, (_currentPage$range4 = currentPage.range) == null ? void 0 : _currentPage$range4.lastRowIndex, rowsMeta.positions]);
104
115
  const computeRenderContext = React.useCallback(() => {
105
116
  if (disableVirtualization) {
106
117
  return {
@@ -4,7 +4,7 @@ export function useGridApiContext() {
4
4
  const apiRef = React.useContext(GridApiContext);
5
5
 
6
6
  if (apiRef === undefined) {
7
- throw new Error(['MUI: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid or DataGridPro parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
7
+ throw new Error(['MUI: Could not find the data grid context.', 'It looks like you rendered your component outside of a DataGrid, DataGridPro or DataGridPremium parent component.', 'This can also happen if you are bundling multiple versions of the data grid.'].join('\n'));
8
8
  }
9
9
 
10
10
  return apiRef;
@@ -4,7 +4,7 @@ export const useGridRootProps = () => {
4
4
  const contextValue = React.useContext(GridRootPropsContext);
5
5
 
6
6
  if (!contextValue) {
7
- throw new Error('MUI: useGridRootProps should only be used inside the DataGrid/DataGridPro component.');
7
+ throw new Error('MUI: useGridRootProps should only be used inside the DataGrid, DataGridPro or DataGridPremium component.');
8
8
  }
9
9
 
10
10
  return contextValue;
package/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /** @license MUI v5.12.2
1
+ /** @license MUI v5.13.1
2
2
  *
3
3
  * This source code is licensed under the MIT license found in the
4
4
  * LICENSE file in the root directory of this source tree.
@@ -88,7 +88,7 @@ DataGridRaw.propTypes = {
88
88
  if (props.columns && props.columns.some(function (column) {
89
89
  return column.resizable;
90
90
  })) {
91
- return new Error(["MUI: `column.resizable = true` is not a valid prop.", 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
91
+ return new Error(["MUI: `column.resizable = true` is not a valid prop.", 'Column resizing is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
92
92
  }
93
93
 
94
94
  return null;
@@ -658,14 +658,14 @@ DataGridRaw.propTypes = {
658
658
  */
659
659
  pageSize: chainPropTypes(PropTypes.number, function (props) {
660
660
  if (props.pageSize && props.pageSize > MAX_PAGE_SIZE) {
661
- return new Error(["MUI: `<DataGrid pageSize={".concat(props.pageSize, "} />` is not a valid prop."), "Only page size below ".concat(MAX_PAGE_SIZE, " is available in the MIT version."), '', 'You need to upgrade to the DataGridPro component to unlock this feature.'].join('\n'));
661
+ return new Error(["MUI: `<DataGrid pageSize={".concat(props.pageSize, "} />` is not a valid prop."), "Only page size below ".concat(MAX_PAGE_SIZE, " is available in the MIT version."), '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock this feature.'].join('\n'));
662
662
  }
663
663
 
664
664
  return null;
665
665
  }),
666
666
  pagination: function pagination(props) {
667
667
  if (props.pagination === false) {
668
- return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to the DataGridPro component to disable the pagination.'].join('\n'));
668
+ return new Error(['MUI: `<DataGrid pagination={false} />` is not a valid prop.', 'Infinite scrolling is not available in the MIT version.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to disable the pagination.'].join('\n'));
669
669
  }
670
670
 
671
671
  return null;
@@ -745,7 +745,7 @@ DataGridRaw.propTypes = {
745
745
  */
746
746
  selectionModel: chainPropTypes(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.array]), function (props) {
747
747
  if (!props.checkboxSelection && Array.isArray(props.selectionModel) && props.selectionModel.length > 1) {
748
- return new Error(["MUI: `<DataGrid selectionModel={".concat(JSON.stringify(props.selectionModel), "} />` is not a valid prop."), 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to the DataGridPro component to unlock multiple selection.'].join('\n'));
748
+ return new Error(["MUI: `<DataGrid selectionModel={".concat(JSON.stringify(props.selectionModel), "} />` is not a valid prop."), 'selectionModel can only be of 1 item in DataGrid.', '', 'You need to upgrade to DataGridPro or DataGridPremium component to unlock multiple selection.'].join('\n'));
749
749
  }
750
750
 
751
751
  return null;
@@ -111,7 +111,8 @@ export var getGridDateOperators = function getGridDateOperators(showTime) {
111
111
  var value = _ref2.value;
112
112
  return value == null;
113
113
  };
114
- }
114
+ },
115
+ requiresFilterValue: false
115
116
  }, {
116
117
  value: 'isNotEmpty',
117
118
  getApplyFilterFn: function getApplyFilterFn() {
@@ -119,6 +120,7 @@ export var getGridDateOperators = function getGridDateOperators(showTime) {
119
120
  var value = _ref3.value;
120
121
  return value != null;
121
122
  };
122
- }
123
+ },
124
+ requiresFilterValue: false
123
125
  }];
124
126
  };
@@ -150,7 +150,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
150
150
  var value = _ref8.value;
151
151
  return value == null;
152
152
  };
153
- }
153
+ },
154
+ requiresFilterValue: false
154
155
  }, {
155
156
  value: 'isNotEmpty',
156
157
  getApplyFilterFn: function getApplyFilterFn() {
@@ -158,7 +159,8 @@ export var getGridNumericOperators = function getGridNumericOperators() {
158
159
  var value = _ref9.value;
159
160
  return value != null;
160
161
  };
161
- }
162
+ },
163
+ requiresFilterValue: false
162
164
  }, {
163
165
  value: 'isAnyOf',
164
166
  getApplyFilterFn: function getApplyFilterFn(filterItem) {
@@ -13,6 +13,7 @@ export var getGridStringQuickFilterFn = function getGridStringQuickFilterFn(valu
13
13
  };
14
14
  };
15
15
  export var getGridStringOperators = function getGridStringOperators() {
16
+ var disableTrim = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
16
17
  return [{
17
18
  value: 'contains',
18
19
  getApplyFilterFn: function getApplyFilterFn(filterItem) {
@@ -20,7 +21,8 @@ export var getGridStringOperators = function getGridStringOperators() {
20
21
  return null;
21
22
  }
22
23
 
23
- var filterRegex = new RegExp(escapeRegExp(filterItem.value), 'i');
24
+ var filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
25
+ var filterRegex = new RegExp(escapeRegExp(filterItemValue), 'i');
24
26
  return function (_ref2) {
25
27
  var value = _ref2.value;
26
28
  return value != null ? filterRegex.test(value.toString()) : false;
@@ -34,13 +36,14 @@ export var getGridStringOperators = function getGridStringOperators() {
34
36
  return null;
35
37
  }
36
38
 
39
+ var filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
37
40
  var collator = new Intl.Collator(undefined, {
38
41
  sensitivity: 'base',
39
42
  usage: 'search'
40
43
  });
41
44
  return function (_ref3) {
42
45
  var value = _ref3.value;
43
- return value != null ? collator.compare(filterItem.value, value.toString()) === 0 : false;
46
+ return value != null ? collator.compare(filterItemValue, value.toString()) === 0 : false;
44
47
  };
45
48
  },
46
49
  InputComponent: GridFilterInputValue
@@ -51,7 +54,8 @@ export var getGridStringOperators = function getGridStringOperators() {
51
54
  return null;
52
55
  }
53
56
 
54
- var filterRegex = new RegExp("^".concat(escapeRegExp(filterItem.value), ".*$"), 'i');
57
+ var filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
58
+ var filterRegex = new RegExp("^".concat(escapeRegExp(filterItemValue), ".*$"), 'i');
55
59
  return function (_ref4) {
56
60
  var value = _ref4.value;
57
61
  return value != null ? filterRegex.test(value.toString()) : false;
@@ -65,7 +69,8 @@ export var getGridStringOperators = function getGridStringOperators() {
65
69
  return null;
66
70
  }
67
71
 
68
- var filterRegex = new RegExp(".*".concat(escapeRegExp(filterItem.value), "$"), 'i');
72
+ var filterItemValue = disableTrim ? filterItem.value : filterItem.value.trim();
73
+ var filterRegex = new RegExp(".*".concat(escapeRegExp(filterItemValue), "$"), 'i');
69
74
  return function (_ref5) {
70
75
  var value = _ref5.value;
71
76
  return value != null ? filterRegex.test(value.toString()) : false;
@@ -79,7 +84,8 @@ export var getGridStringOperators = function getGridStringOperators() {
79
84
  var value = _ref6.value;
80
85
  return value === '' || value == null;
81
86
  };
82
- }
87
+ },
88
+ requiresFilterValue: false
83
89
  }, {
84
90
  value: 'isNotEmpty',
85
91
  getApplyFilterFn: function getApplyFilterFn() {
@@ -87,7 +93,8 @@ export var getGridStringOperators = function getGridStringOperators() {
87
93
  var value = _ref7.value;
88
94
  return value !== '' && value != null;
89
95
  };
90
- }
96
+ },
97
+ requiresFilterValue: false
91
98
  }, {
92
99
  value: 'isAnyOf',
93
100
  getApplyFilterFn: function getApplyFilterFn(filterItem) {
@@ -95,13 +102,16 @@ export var getGridStringOperators = function getGridStringOperators() {
95
102
  return null;
96
103
  }
97
104
 
105
+ var filterItemValue = disableTrim ? filterItem.value : filterItem.value.map(function (val) {
106
+ return val.trim();
107
+ });
98
108
  var collator = new Intl.Collator(undefined, {
99
109
  sensitivity: 'base',
100
110
  usage: 'search'
101
111
  });
102
112
  return function (_ref8) {
103
113
  var value = _ref8.value;
104
- return value != null ? filterItem.value.some(function (filterValue) {
114
+ return value != null ? filterItemValue.some(function (filterValue) {
105
115
  return collator.compare(filterValue, value.toString() || '') === 0;
106
116
  }) : false;
107
117
  };
@@ -112,7 +112,7 @@ function GridRow(props) {
112
112
  // Fallback for IE
113
113
  apiRef.current.unstable_storeRowHeightMeasurement(rowId, ref.current.clientHeight);
114
114
  }
115
- });
115
+ }, [apiRef, rowHeight, rowId]);
116
116
  React.useLayoutEffect(function () {
117
117
  if (currentPage.range) {
118
118
  // The index prop is relative to the rows from all pages. As example, the index prop of the
@@ -5,6 +5,7 @@ import * as React from 'react';
5
5
  import { unstable_composeClasses as composeClasses } from '@mui/material';
6
6
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
7
7
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
8
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
 
10
11
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -31,6 +32,7 @@ export var GridBooleanCell = /*#__PURE__*/React.memo(function (props) {
31
32
  getValue = props.getValue,
32
33
  other = _objectWithoutProperties(props, _excluded);
33
34
 
35
+ var apiRef = useGridApiContext();
34
36
  var rootProps = useGridRootProps();
35
37
  var ownerState = {
36
38
  classes: rootProps.classes
@@ -42,7 +44,7 @@ export var GridBooleanCell = /*#__PURE__*/React.memo(function (props) {
42
44
  return /*#__PURE__*/_jsx(Icon, _extends({
43
45
  fontSize: "small",
44
46
  className: classes.root,
45
- titleAccess: api.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
47
+ titleAccess: apiRef.current.getLocaleText(value ? 'booleanCellTrueLabel' : 'booleanCellFalseLabel'),
46
48
  "data-value": Boolean(value)
47
49
  }, other));
48
50
  });
@@ -11,6 +11,7 @@ import { unstable_composeClasses as composeClasses } from '@mui/material';
11
11
  import { unstable_useId as useId, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
12
12
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
13
13
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
14
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
 
16
17
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -44,6 +45,7 @@ function GridEditBooleanCell(props) {
44
45
  onValueChange = props.onValueChange,
45
46
  other = _objectWithoutProperties(props, _excluded);
46
47
 
48
+ var apiRef = useGridApiContext();
47
49
  var inputRef = React.useRef(null);
48
50
  var id = useId();
49
51
 
@@ -77,7 +79,7 @@ function GridEditBooleanCell(props) {
77
79
  case 4:
78
80
  setValueState(newValue);
79
81
  _context.next = 7;
80
- return api.setEditCellValue({
82
+ return apiRef.current.setEditCellValue({
81
83
  id: idProp,
82
84
  field: field,
83
85
  value: newValue
@@ -94,7 +96,7 @@ function GridEditBooleanCell(props) {
94
96
  return function (_x) {
95
97
  return _ref.apply(this, arguments);
96
98
  };
97
- }(), [api, field, idProp, onValueChange]);
99
+ }(), [apiRef, field, idProp, onValueChange]);
98
100
  React.useEffect(function () {
99
101
  setValueState(value);
100
102
  }, [value]);
@@ -11,6 +11,7 @@ import { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/u
11
11
  import InputBase from '@mui/material/InputBase';
12
12
  import { getDataGridUtilityClass } from '../../constants/gridClasses';
13
13
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
14
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
 
16
17
  var useUtilityClasses = function useUtilityClasses(ownerState) {
@@ -42,6 +43,7 @@ function GridEditDateCell(props) {
42
43
  other = _objectWithoutProperties(props, _excluded);
43
44
 
44
45
  var isDateTime = colDef.type === 'dateTime';
46
+ var apiRef = useGridApiContext();
45
47
  var inputRef = React.useRef();
46
48
  var valueTransformed = React.useMemo(function () {
47
49
  var parsedDate;
@@ -117,7 +119,7 @@ function GridEditDateCell(props) {
117
119
  parsed: newParsedDate,
118
120
  formatted: newFormattedDate
119
121
  });
120
- api.setEditCellValue({
122
+ apiRef.current.setEditCellValue({
121
123
  id: id,
122
124
  field: field,
123
125
  value: newParsedDate
@@ -134,7 +136,7 @@ function GridEditDateCell(props) {
134
136
  return function (_x) {
135
137
  return _ref.apply(this, arguments);
136
138
  };
137
- }(), [api, field, id, onValueChange]);
139
+ }(), [apiRef, field, id, onValueChange]);
138
140
  React.useEffect(function () {
139
141
  setValueState(function (state) {
140
142
  var _valueTransformed$par, _state$parsed;