@mui/x-data-grid 5.11.0 → 5.12.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 (217) hide show
  1. package/CHANGELOG.md +237 -16
  2. package/DataGrid/DataGrid.js +26 -1
  3. package/README.md +3 -4
  4. package/components/GridRow.d.ts +1 -1
  5. package/components/GridRow.js +51 -12
  6. package/components/base/GridOverlays.js +1 -1
  7. package/components/cell/GridActionsCellItem.d.ts +1 -1
  8. package/components/cell/GridCell.d.ts +2 -1
  9. package/components/cell/GridCell.js +12 -7
  10. package/components/columnHeaders/GridColumnHeaderItem.js +4 -3
  11. package/components/containers/GridRoot.js +25 -5
  12. package/components/containers/GridRootStyles.js +7 -2
  13. package/components/menu/GridMenu.js +9 -2
  14. package/components/panel/GridColumnsPanel.js +10 -2
  15. package/components/panel/GridPanelWrapper.d.ts +1 -1
  16. package/components/panel/GridPanelWrapper.js +3 -3
  17. package/components/panel/filterPanel/GridFilterForm.d.ts +61 -4
  18. package/components/panel/filterPanel/GridFilterForm.js +88 -8
  19. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  20. package/components/panel/filterPanel/GridFilterPanel.d.ts +8 -5
  21. package/components/panel/filterPanel/GridFilterPanel.js +25 -9
  22. package/components/toolbar/GridToolbarFilterButton.d.ts +1 -1
  23. package/components/toolbar/GridToolbarQuickFilter.d.ts +7 -0
  24. package/components/toolbar/GridToolbarQuickFilter.js +58 -6
  25. package/constants/defaultGridSlotsComponents.js +4 -2
  26. package/constants/gridClasses.d.ts +16 -0
  27. package/constants/gridClasses.js +1 -1
  28. package/hooks/core/pipeProcessing/gridPipeProcessingApi.d.ts +4 -0
  29. package/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
  30. package/hooks/core/useGridStateInitialization.js +19 -6
  31. package/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  32. package/hooks/features/columns/gridColumnsInterfaces.d.ts +3 -0
  33. package/hooks/features/columns/useGridColumns.js +13 -15
  34. package/hooks/features/editRows/useGridCellEditing.new.js +11 -4
  35. package/hooks/features/editRows/useGridEditing.old.js +1 -1
  36. package/hooks/features/editRows/useGridRowEditing.new.js +10 -4
  37. package/hooks/features/events/useGridEvents.d.ts +1 -1
  38. package/hooks/features/events/useGridEvents.js +2 -0
  39. package/hooks/features/filter/gridFilterSelector.d.ts +5 -0
  40. package/hooks/features/filter/gridFilterSelector.js +6 -0
  41. package/hooks/features/filter/gridFilterUtils.d.ts +10 -2
  42. package/hooks/features/filter/gridFilterUtils.js +3 -6
  43. package/hooks/features/filter/useGridFilter.js +29 -12
  44. package/hooks/features/pagination/useGridPage.js +1 -1
  45. package/hooks/features/pagination/useGridPageSize.js +1 -1
  46. package/hooks/features/rows/gridRowsState.d.ts +14 -5
  47. package/hooks/features/rows/gridRowsUtils.d.ts +13 -1
  48. package/hooks/features/rows/gridRowsUtils.js +54 -0
  49. package/hooks/features/rows/useGridRows.js +63 -102
  50. package/hooks/features/rows/useGridRowsMeta.d.ts +1 -1
  51. package/hooks/features/rows/useGridRowsMeta.js +107 -43
  52. package/hooks/features/selection/useGridSelection.js +1 -1
  53. package/hooks/features/sorting/useGridSorting.js +1 -1
  54. package/hooks/features/virtualization/useGridVirtualScroller.d.ts +1 -0
  55. package/hooks/features/virtualization/useGridVirtualScroller.js +27 -7
  56. package/index.js +1 -1
  57. package/internals/index.d.ts +1 -0
  58. package/legacy/DataGrid/DataGrid.js +26 -1
  59. package/legacy/components/GridRow.js +56 -12
  60. package/legacy/components/base/GridOverlays.js +1 -1
  61. package/legacy/components/cell/GridCell.js +12 -7
  62. package/legacy/components/columnHeaders/GridColumnHeaderItem.js +6 -3
  63. package/legacy/components/containers/GridRoot.js +23 -5
  64. package/legacy/components/containers/GridRootStyles.js +9 -6
  65. package/legacy/components/menu/GridMenu.js +9 -2
  66. package/legacy/components/panel/GridColumnsPanel.js +12 -2
  67. package/legacy/components/panel/GridPanelWrapper.js +3 -3
  68. package/legacy/components/panel/filterPanel/GridFilterForm.js +89 -8
  69. package/legacy/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  70. package/legacy/components/panel/filterPanel/GridFilterPanel.js +27 -10
  71. package/legacy/components/toolbar/GridToolbarQuickFilter.js +68 -8
  72. package/legacy/constants/defaultGridSlotsComponents.js +4 -2
  73. package/legacy/constants/gridClasses.js +1 -1
  74. package/legacy/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -10
  75. package/legacy/hooks/core/useGridStateInitialization.js +18 -6
  76. package/legacy/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  77. package/legacy/hooks/features/columns/useGridColumns.js +13 -15
  78. package/legacy/hooks/features/editRows/useGridCellEditing.new.js +14 -7
  79. package/legacy/hooks/features/editRows/useGridEditing.old.js +1 -1
  80. package/legacy/hooks/features/editRows/useGridRowEditing.new.js +10 -4
  81. package/legacy/hooks/features/events/useGridEvents.js +2 -0
  82. package/legacy/hooks/features/filter/gridFilterSelector.js +8 -0
  83. package/legacy/hooks/features/filter/gridFilterUtils.js +4 -7
  84. package/legacy/hooks/features/filter/useGridFilter.js +33 -12
  85. package/legacy/hooks/features/pagination/useGridPage.js +1 -1
  86. package/legacy/hooks/features/pagination/useGridPageSize.js +1 -1
  87. package/legacy/hooks/features/rows/gridRowsUtils.js +55 -0
  88. package/legacy/hooks/features/rows/useGridRows.js +75 -111
  89. package/legacy/hooks/features/rows/useGridRowsMeta.js +104 -41
  90. package/legacy/hooks/features/selection/useGridSelection.js +1 -1
  91. package/legacy/hooks/features/sorting/useGridSorting.js +1 -1
  92. package/legacy/hooks/features/virtualization/useGridVirtualScroller.js +46 -22
  93. package/legacy/index.js +1 -1
  94. package/legacy/locales/heIL.js +9 -9
  95. package/legacy/locales/jaJP.js +28 -24
  96. package/legacy/locales/nbNO.js +127 -0
  97. package/legacy/locales/ruRU.js +9 -9
  98. package/legacy/locales/trTR.js +7 -7
  99. package/legacy/models/events/gridEvents.js +2 -0
  100. package/legacy/models/gridApiCaches.js +1 -0
  101. package/legacy/models/params/gridMenuParams.js +1 -0
  102. package/legacy/models/params/index.js +2 -1
  103. package/locales/heIL.js +9 -9
  104. package/locales/jaJP.js +24 -24
  105. package/locales/nbNO.d.ts +2 -0
  106. package/locales/nbNO.js +115 -0
  107. package/locales/ruRU.js +9 -9
  108. package/locales/trTR.js +7 -7
  109. package/models/api/gridCallbackDetails.d.ts +6 -1
  110. package/models/api/gridCoreApi.d.ts +2 -6
  111. package/models/api/gridFilterApi.d.ts +8 -1
  112. package/models/api/gridRowsMetaApi.d.ts +24 -0
  113. package/models/api/gridStateApi.d.ts +14 -3
  114. package/models/colDef/gridColDef.d.ts +3 -3
  115. package/models/events/gridEventLookup.d.ts +16 -1
  116. package/models/events/gridEvents.d.ts +3 -1
  117. package/models/events/gridEvents.js +2 -0
  118. package/models/gridApiCaches.d.ts +6 -0
  119. package/models/gridApiCaches.js +1 -0
  120. package/models/gridIconSlotsComponent.d.ts +10 -0
  121. package/models/params/gridMenuParams.d.ts +7 -0
  122. package/models/params/gridMenuParams.js +1 -0
  123. package/models/params/gridRowParams.d.ts +1 -1
  124. package/models/params/index.d.ts +1 -0
  125. package/models/params/index.js +2 -1
  126. package/models/props/DataGridProps.d.ts +24 -2
  127. package/modern/DataGrid/DataGrid.js +26 -1
  128. package/modern/components/GridRow.js +51 -12
  129. package/modern/components/base/GridOverlays.js +1 -1
  130. package/modern/components/cell/GridCell.js +12 -7
  131. package/modern/components/columnHeaders/GridColumnHeaderItem.js +4 -3
  132. package/modern/components/containers/GridRoot.js +25 -3
  133. package/modern/components/containers/GridRootStyles.js +7 -2
  134. package/modern/components/menu/GridMenu.js +9 -2
  135. package/modern/components/panel/GridColumnsPanel.js +10 -2
  136. package/modern/components/panel/GridPanelWrapper.js +3 -3
  137. package/modern/components/panel/filterPanel/GridFilterForm.js +88 -8
  138. package/modern/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  139. package/modern/components/panel/filterPanel/GridFilterPanel.js +25 -9
  140. package/modern/components/toolbar/GridToolbarQuickFilter.js +58 -6
  141. package/modern/constants/defaultGridSlotsComponents.js +4 -2
  142. package/modern/constants/gridClasses.js +1 -1
  143. package/modern/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -9
  144. package/modern/hooks/core/useGridStateInitialization.js +19 -6
  145. package/modern/hooks/features/columnMenu/useGridColumnMenu.js +22 -0
  146. package/modern/hooks/features/columns/useGridColumns.js +12 -14
  147. package/modern/hooks/features/editRows/useGridCellEditing.new.js +10 -3
  148. package/modern/hooks/features/editRows/useGridEditing.old.js +1 -1
  149. package/modern/hooks/features/editRows/useGridRowEditing.new.js +9 -3
  150. package/modern/hooks/features/events/useGridEvents.js +2 -0
  151. package/modern/hooks/features/filter/gridFilterSelector.js +6 -0
  152. package/modern/hooks/features/filter/gridFilterUtils.js +3 -6
  153. package/modern/hooks/features/filter/useGridFilter.js +29 -12
  154. package/modern/hooks/features/pagination/useGridPage.js +1 -1
  155. package/modern/hooks/features/pagination/useGridPageSize.js +1 -1
  156. package/modern/hooks/features/rows/gridRowsUtils.js +54 -0
  157. package/modern/hooks/features/rows/useGridRows.js +63 -102
  158. package/modern/hooks/features/rows/useGridRowsMeta.js +105 -37
  159. package/modern/hooks/features/selection/useGridSelection.js +1 -1
  160. package/modern/hooks/features/sorting/useGridSorting.js +1 -1
  161. package/modern/hooks/features/virtualization/useGridVirtualScroller.js +27 -7
  162. package/modern/index.js +1 -1
  163. package/modern/locales/heIL.js +9 -9
  164. package/modern/locales/jaJP.js +24 -24
  165. package/modern/locales/nbNO.js +115 -0
  166. package/modern/locales/ruRU.js +9 -9
  167. package/modern/locales/trTR.js +7 -7
  168. package/modern/models/events/gridEvents.js +2 -0
  169. package/modern/models/gridApiCaches.js +1 -0
  170. package/modern/models/params/gridMenuParams.js +1 -0
  171. package/modern/models/params/index.js +2 -1
  172. package/node/DataGrid/DataGrid.js +26 -1
  173. package/node/components/GridRow.js +53 -12
  174. package/node/components/base/GridOverlays.js +1 -1
  175. package/node/components/cell/GridCell.js +12 -7
  176. package/node/components/columnHeaders/GridColumnHeaderItem.js +4 -3
  177. package/node/components/containers/GridRoot.js +24 -3
  178. package/node/components/containers/GridRootStyles.js +7 -2
  179. package/node/components/menu/GridMenu.js +10 -2
  180. package/node/components/panel/GridColumnsPanel.js +10 -2
  181. package/node/components/panel/GridPanelWrapper.js +5 -3
  182. package/node/components/panel/filterPanel/GridFilterForm.js +91 -9
  183. package/node/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +0 -1
  184. package/node/components/panel/filterPanel/GridFilterPanel.js +27 -9
  185. package/node/components/toolbar/GridToolbarQuickFilter.js +61 -6
  186. package/node/constants/defaultGridSlotsComponents.js +3 -1
  187. package/node/constants/gridClasses.js +1 -1
  188. package/node/hooks/core/pipeProcessing/useGridPipeProcessing.js +10 -8
  189. package/node/hooks/core/useGridStateInitialization.js +19 -6
  190. package/node/hooks/features/columnMenu/useGridColumnMenu.js +23 -0
  191. package/node/hooks/features/columns/useGridColumns.js +13 -15
  192. package/node/hooks/features/editRows/useGridCellEditing.new.js +11 -4
  193. package/node/hooks/features/editRows/useGridEditing.old.js +1 -1
  194. package/node/hooks/features/editRows/useGridRowEditing.new.js +10 -4
  195. package/node/hooks/features/events/useGridEvents.js +2 -0
  196. package/node/hooks/features/filter/gridFilterSelector.js +9 -2
  197. package/node/hooks/features/filter/gridFilterUtils.js +4 -5
  198. package/node/hooks/features/filter/useGridFilter.js +28 -11
  199. package/node/hooks/features/pagination/useGridPage.js +1 -1
  200. package/node/hooks/features/pagination/useGridPageSize.js +1 -1
  201. package/node/hooks/features/rows/gridRowsUtils.js +67 -1
  202. package/node/hooks/features/rows/useGridRows.js +63 -99
  203. package/node/hooks/features/rows/useGridRowsMeta.js +107 -43
  204. package/node/hooks/features/selection/useGridSelection.js +1 -1
  205. package/node/hooks/features/sorting/useGridSorting.js +1 -1
  206. package/node/hooks/features/virtualization/useGridVirtualScroller.js +27 -7
  207. package/node/index.js +1 -1
  208. package/node/locales/heIL.js +9 -9
  209. package/node/locales/jaJP.js +24 -24
  210. package/node/locales/nbNO.js +125 -0
  211. package/node/locales/ruRU.js +9 -9
  212. package/node/locales/trTR.js +7 -7
  213. package/node/models/events/gridEvents.js +2 -0
  214. package/node/models/gridApiCaches.js +5 -0
  215. package/node/models/params/gridMenuParams.js +5 -0
  216. package/node/models/params/index.js +13 -0
  217. package/package.json +7 -5
@@ -70,6 +70,7 @@ function GridColumnHeaderItem(props) {
70
70
  hasScrollX: false,
71
71
  hasScrollY: false
72
72
  };
73
+ const isDraggable = React.useMemo(() => !rootProps.disableColumnReorder && !disableReorder && !column.disableReorder, [rootProps.disableColumnReorder, disableReorder, column.disableReorder]);
73
74
  let headerComponent = null;
74
75
 
75
76
  if (column.renderHeader) {
@@ -100,12 +101,12 @@ function GridColumnHeaderItem(props) {
100
101
  onFocus: publish('columnHeaderFocus'),
101
102
  onBlur: publish('columnHeaderBlur')
102
103
  };
103
- const draggableEventHandlers = {
104
+ const draggableEventHandlers = isDraggable ? {
104
105
  onDragStart: publish('columnHeaderDragStart'),
105
106
  onDragEnter: publish('columnHeaderDragEnter'),
106
107
  onDragOver: publish('columnHeaderDragOver'),
107
108
  onDragEnd: publish('columnHeaderDragEnd')
108
- };
109
+ } : null;
109
110
  const removeLastBorderRight = isLastColumn && hasScrollX && !hasScrollY;
110
111
  const showRightBorder = !isLastColumn ? rootProps.showColumnRightBorder : !removeLastBorderRight && !extendRowFullWidth;
111
112
 
@@ -182,7 +183,7 @@ function GridColumnHeaderItem(props) {
182
183
  }, mouseEventsHandlers, {
183
184
  children: [/*#__PURE__*/_jsxs("div", _extends({
184
185
  className: classes.draggableContainer,
185
- draggable: !rootProps.disableColumnReorder && !disableReorder && !column.disableReorder
186
+ draggable: isDraggable
186
187
  }, draggableEventHandlers, {
187
188
  children: [/*#__PURE__*/_jsxs("div", {
188
189
  className: classes.titleContainer,
@@ -4,18 +4,31 @@ const _excluded = ["children", "className"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import clsx from 'clsx';
7
- import { useForkRef, unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/material/utils';
7
+ import { useForkRef, unstable_useEnhancedEffect as useEnhancedEffect, capitalize } from '@mui/material/utils';
8
+ import { unstable_composeClasses as composeClasses } from '@mui/material';
8
9
  import { GridRootStyles } from './GridRootStyles';
9
10
  import { gridVisibleColumnDefinitionsSelector } from '../../hooks/features/columns/gridColumnsSelector';
10
11
  import { useGridSelector } from '../../hooks/utils/useGridSelector';
11
12
  import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
12
13
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
13
- import { gridClasses } from '../../constants/gridClasses';
14
+ import { getDataGridUtilityClass } from '../../constants/gridClasses';
14
15
  import { gridRowCountSelector } from '../../hooks/features/rows/gridRowsSelector';
16
+ import { gridDensityValueSelector } from '../../hooks/features/density/densitySelector';
15
17
  import { jsx as _jsx } from "react/jsx-runtime";
16
- const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
17
- var _rootProps$classes;
18
18
 
19
+ const useUtilityClasses = ownerState => {
20
+ const {
21
+ autoHeight,
22
+ density,
23
+ classes
24
+ } = ownerState;
25
+ const slots = {
26
+ root: ['root', autoHeight && 'autoHeight', `root--density${capitalize(density)}`]
27
+ };
28
+ return composeClasses(slots, getDataGridUtilityClass, classes);
29
+ };
30
+
31
+ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
19
32
  const rootProps = useGridRootProps();
20
33
 
21
34
  const {
@@ -27,8 +40,15 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
27
40
  const apiRef = useGridApiContext();
28
41
  const visibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
29
42
  const totalRowCount = useGridSelector(apiRef, gridRowCountSelector);
43
+ const densityValue = useGridSelector(apiRef, gridDensityValueSelector);
30
44
  const rootContainerRef = React.useRef(null);
31
45
  const handleRef = useForkRef(rootContainerRef, ref);
46
+ const ownerState = {
47
+ density: densityValue,
48
+ classes: rootProps.classes,
49
+ autoHeight: rootProps.autoHeight
50
+ };
51
+ const classes = useUtilityClasses(ownerState);
32
52
  apiRef.current.rootElementRef = rootContainerRef; // Our implementation of <NoSsr />
33
53
 
34
54
  const [mountedState, setMountedState] = React.useState(false);
@@ -47,7 +67,7 @@ const GridRoot = /*#__PURE__*/React.forwardRef(function GridRoot(props, ref) {
47
67
 
48
68
  return /*#__PURE__*/_jsx(GridRootStyles, _extends({
49
69
  ref: handleRef,
50
- className: clsx(className, (_rootProps$classes = rootProps.classes) == null ? void 0 : _rootProps$classes.root, gridClasses.root, rootProps.autoHeight && gridClasses.autoHeight),
70
+ className: clsx(className, classes.root),
51
71
  role: "grid",
52
72
  "aria-colcount": visibleColumns.length,
53
73
  "aria-rowcount": totalRowCount,
@@ -221,6 +221,9 @@ export const GridRootStyles = styled('div', {
221
221
  },
222
222
  [`&.${gridClasses['columnSeparator--resizing']}`]: {
223
223
  color: theme.palette.text.primary
224
+ },
225
+ '& svg': {
226
+ pointerEvents: 'none'
224
227
  }
225
228
  },
226
229
  [`& .${gridClasses.iconSeparator}`]: {
@@ -274,10 +277,12 @@ export const GridRootStyles = styled('div', {
274
277
  [`& .${gridClasses.cell}`]: {
275
278
  display: 'flex',
276
279
  alignItems: 'center',
277
- overflow: 'hidden',
278
- whiteSpace: 'nowrap',
279
280
  borderBottom: `1px solid ${borderColor}`
280
281
  },
282
+ [`& .${gridClasses.row}:not(.${gridClasses['row--dynamicHeight']}) > .${gridClasses.cell}`]: {
283
+ overflow: 'hidden',
284
+ whiteSpace: 'nowrap'
285
+ },
281
286
  [`& .${gridClasses.cellContent}`]: {
282
287
  overflow: 'hidden',
283
288
  textOverflow: 'ellipsis'
@@ -13,6 +13,7 @@ import { styled } from '@mui/material/styles';
13
13
  import { HTMLElementType } from '@mui/utils';
14
14
  import { getDataGridUtilityClass, gridClasses } from '../../constants/gridClasses';
15
15
  import { useGridRootProps } from '../../hooks/utils/useGridRootProps';
16
+ import { useGridApiContext } from '../../hooks/utils/useGridApiContext';
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
 
18
19
  const useUtilityClasses = ownerState => {
@@ -56,6 +57,7 @@ const GridMenu = props => {
56
57
  } = props,
57
58
  other = _objectWithoutPropertiesLoose(props, _excluded);
58
59
 
60
+ const apiRef = useGridApiContext();
59
61
  const prevTarget = React.useRef(target);
60
62
  const prevOpen = React.useRef(open);
61
63
  const rootProps = useGridRootProps();
@@ -66,11 +68,16 @@ const GridMenu = props => {
66
68
  React.useEffect(() => {
67
69
  if (prevOpen.current && prevTarget.current) {
68
70
  prevTarget.current.focus();
69
- }
71
+ } // Emit menuOpen or menuClose events
72
+
70
73
 
74
+ const eventName = open ? 'menuOpen' : 'menuClose';
75
+ apiRef.current.publishEvent(eventName, {
76
+ target
77
+ });
71
78
  prevOpen.current = open;
72
79
  prevTarget.current = target;
73
- }, [open, target]);
80
+ }, [apiRef, open, target]);
74
81
 
75
82
  const handleExited = popperOnExited => node => {
76
83
  if (popperOnExited) {
@@ -76,8 +76,16 @@ export function GridColumnsPanel(props) {
76
76
  };
77
77
 
78
78
  const toggleAllColumns = React.useCallback(isVisible => {
79
- // TODO v6: call `setColumnVisibilityModel` directly
80
- apiRef.current.updateColumns(columns.map(col => {
79
+ if (apiRef.current.unstable_caches.columns.isUsingColumnVisibilityModel) {
80
+ if (isVisible) {
81
+ return apiRef.current.setColumnVisibilityModel({});
82
+ }
83
+
84
+ return apiRef.current.setColumnVisibilityModel(Object.fromEntries(columns.map(col => [col.field, false])));
85
+ } // TODO v6: Remove
86
+
87
+
88
+ return apiRef.current.updateColumns(columns.map(col => {
81
89
  if (col.hideable !== false) {
82
90
  return {
83
91
  field: col.field,
@@ -3,5 +3,5 @@ import { Theme } from '@mui/material/styles';
3
3
  import { MUIStyledCommonProps } from '@mui/system';
4
4
  export interface GridPanelWrapperProps extends React.PropsWithChildren<React.HTMLAttributes<HTMLDivElement>>, MUIStyledCommonProps<Theme> {
5
5
  }
6
- declare function GridPanelWrapper(props: GridPanelWrapperProps): JSX.Element;
6
+ declare const GridPanelWrapper: React.ForwardRefExoticComponent<GridPanelWrapperProps & React.RefAttributes<HTMLDivElement>>;
7
7
  export { GridPanelWrapper };
@@ -35,7 +35,7 @@ const GridPanelWrapperRoot = styled('div', {
35
35
 
36
36
  const isEnabled = () => true;
37
37
 
38
- function GridPanelWrapper(props) {
38
+ const GridPanelWrapper = /*#__PURE__*/React.forwardRef(function GridPanelWrapper(props, ref) {
39
39
  const {
40
40
  className
41
41
  } = props,
@@ -51,10 +51,10 @@ function GridPanelWrapper(props) {
51
51
  disableEnforceFocus: true,
52
52
  isEnabled: isEnabled,
53
53
  children: /*#__PURE__*/_jsx(GridPanelWrapperRoot, _extends({
54
+ ref: ref,
54
55
  tabIndex: -1,
55
56
  className: clsx(className, classes.root)
56
57
  }, other))
57
58
  });
58
- }
59
-
59
+ });
60
60
  export { GridPanelWrapper };
@@ -1,25 +1,82 @@
1
1
  import * as React from 'react';
2
2
  import { GridFilterItem, GridLinkOperator } from '../../../models/gridFilterItem';
3
3
  export interface GridFilterFormProps {
4
+ /**
5
+ * The [[GridFilterItem]] representing this form.
6
+ */
4
7
  item: GridFilterItem;
8
+ /**
9
+ * If `true`, the logic operator field is rendered.
10
+ * The field will be invisible if `showMultiFilterOperators` is also `true`.
11
+ */
5
12
  hasMultipleFilters: boolean;
13
+ /**
14
+ * If `true`, the logic operator field is visible.
15
+ */
6
16
  showMultiFilterOperators?: boolean;
17
+ /**
18
+ * The current logic operator applied.
19
+ */
7
20
  multiFilterOperator?: GridLinkOperator;
21
+ /**
22
+ * If `true`, disables the logic operator field but still renders it.
23
+ */
8
24
  disableMultiFilterOperator?: boolean;
25
+ /**
26
+ * A ref allowing to set imperative focus.
27
+ * It can be passed to the el
28
+ */
9
29
  focusElementRef?: React.Ref<any>;
30
+ /**
31
+ * Callback called when the operator, column field or value is changed.
32
+ * @param {GridFilterItem} item The updated [[GridFilterItem]].
33
+ */
10
34
  applyFilterChanges: (item: GridFilterItem) => void;
35
+ /**
36
+ * Callback called when the logic operator is changed.
37
+ * @param {GridLinkOperator} operator The new logic operator.
38
+ */
11
39
  applyMultiFilterOperatorChanges: (operator: GridLinkOperator) => void;
40
+ /**
41
+ * Callback called when the delete button is clicked.
42
+ * @param {GridFilterItem} item The deleted [[GridFilterItem]].
43
+ */
12
44
  deleteFilter: (item: GridFilterItem) => void;
45
+ /**
46
+ * Sets the available logic operators.
47
+ * @default [GridLinkOperator.And, GridLinkOperator.Or]
48
+ */
13
49
  linkOperators?: GridLinkOperator[];
50
+ /**
51
+ * Changes how the options in the columns selector should be ordered.
52
+ * If not specified, the order is derived from the `columns` prop.
53
+ */
14
54
  columnsSort?: 'asc' | 'desc';
55
+ /**
56
+ * Props passed to the delete icon.
57
+ * @default {}
58
+ */
15
59
  deleteIconProps?: any;
60
+ /**
61
+ * Props passed to the logic operator input component.
62
+ * @default {}
63
+ */
16
64
  linkOperatorInputProps?: any;
65
+ /**
66
+ * Props passed to the operator input component.
67
+ * @default {}
68
+ */
17
69
  operatorInputProps?: any;
70
+ /**
71
+ * Props passed to the column input component.
72
+ * @default {}
73
+ */
18
74
  columnInputProps?: any;
75
+ /**
76
+ * Props passed to the value input component.
77
+ * @default {}
78
+ */
19
79
  valueInputProps?: any;
20
80
  }
21
- declare function GridFilterForm(props: GridFilterFormProps): JSX.Element;
22
- declare namespace GridFilterForm {
23
- var propTypes: any;
24
- }
81
+ declare const GridFilterForm: React.ForwardRefExoticComponent<GridFilterFormProps & React.RefAttributes<HTMLDivElement>>;
25
82
  export { GridFilterForm };
@@ -1,4 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ const _excluded = ["item", "hasMultipleFilters", "deleteFilter", "applyFilterChanges", "multiFilterOperator", "showMultiFilterOperators", "disableMultiFilterOperator", "applyMultiFilterOperatorChanges", "focusElementRef", "linkOperators", "columnsSort", "deleteIconProps", "linkOperatorInputProps", "operatorInputProps", "columnInputProps", "valueInputProps", "children"];
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
4
6
  import { unstable_composeClasses as composeClasses } from '@mui/material';
@@ -102,8 +104,7 @@ const getLinkOperatorLocaleKey = linkOperator => {
102
104
  const getColumnLabel = col => col.headerName || col.field;
103
105
 
104
106
  const collator = new Intl.Collator();
105
-
106
- function GridFilterForm(props) {
107
+ const GridFilterForm = /*#__PURE__*/React.forwardRef(function GridFilterForm(props, ref) {
107
108
  var _rootProps$components, _rootProps$components2, _baseSelectProps$nati, _rootProps$components3, _rootProps$components4, _rootProps$components5, _currentColumn$filter2;
108
109
 
109
110
  const {
@@ -123,7 +124,9 @@ function GridFilterForm(props) {
123
124
  operatorInputProps = {},
124
125
  columnInputProps = {},
125
126
  valueInputProps = {}
126
- } = props;
127
+ } = props,
128
+ other = _objectWithoutPropertiesLoose(props, _excluded);
129
+
127
130
  const apiRef = useGridApiContext();
128
131
  const filterableColumns = useGridSelector(apiRef, gridFilterableColumnDefinitionsSelector);
129
132
  const columnSelectId = useId();
@@ -223,8 +226,10 @@ function GridFilterForm(props) {
223
226
  }
224
227
  }
225
228
  }), [currentOperator]);
226
- return /*#__PURE__*/_jsxs(GridFilterFormRoot, {
227
- className: classes.root,
229
+ return /*#__PURE__*/_jsxs(GridFilterFormRoot, _extends({
230
+ ref: ref,
231
+ className: classes.root
232
+ }, other, {
228
233
  children: [/*#__PURE__*/_jsx(FilterFormDeleteIcon, _extends({
229
234
  variant: "standard",
230
235
  as: rootProps.components.BaseFormControl
@@ -319,36 +324,111 @@ function GridFilterForm(props) {
319
324
  focusElementRef: valueRef
320
325
  }, currentOperator.InputComponentProps)) : null
321
326
  }))]
322
- });
323
- }
324
-
327
+ }));
328
+ });
325
329
  process.env.NODE_ENV !== "production" ? GridFilterForm.propTypes = {
326
330
  // ----------------------------- Warning --------------------------------
327
331
  // | These PropTypes are generated from the TypeScript type definitions |
328
332
  // | To update them edit the TypeScript types and run "yarn proptypes" |
329
333
  // ----------------------------------------------------------------------
334
+
335
+ /**
336
+ * Callback called when the operator, column field or value is changed.
337
+ * @param {GridFilterItem} item The updated [[GridFilterItem]].
338
+ */
330
339
  applyFilterChanges: PropTypes.func.isRequired,
340
+
341
+ /**
342
+ * Callback called when the logic operator is changed.
343
+ * @param {GridLinkOperator} operator The new logic operator.
344
+ */
331
345
  applyMultiFilterOperatorChanges: PropTypes.func.isRequired,
346
+
347
+ /**
348
+ * Props passed to the column input component.
349
+ * @default {}
350
+ */
332
351
  columnInputProps: PropTypes.any,
352
+
353
+ /**
354
+ * Changes how the options in the columns selector should be ordered.
355
+ * If not specified, the order is derived from the `columns` prop.
356
+ */
333
357
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
358
+
359
+ /**
360
+ * Callback called when the delete button is clicked.
361
+ * @param {GridFilterItem} item The deleted [[GridFilterItem]].
362
+ */
334
363
  deleteFilter: PropTypes.func.isRequired,
364
+
365
+ /**
366
+ * Props passed to the delete icon.
367
+ * @default {}
368
+ */
335
369
  deleteIconProps: PropTypes.any,
370
+
371
+ /**
372
+ * If `true`, disables the logic operator field but still renders it.
373
+ */
336
374
  disableMultiFilterOperator: PropTypes.bool,
375
+
376
+ /**
377
+ * A ref allowing to set imperative focus.
378
+ * It can be passed to the el
379
+ */
337
380
  focusElementRef: PropTypes
338
381
  /* @typescript-to-proptypes-ignore */
339
382
  .oneOfType([PropTypes.func, PropTypes.object]),
383
+
384
+ /**
385
+ * If `true`, the logic operator field is rendered.
386
+ * The field will be invisible if `showMultiFilterOperators` is also `true`.
387
+ */
340
388
  hasMultipleFilters: PropTypes.bool.isRequired,
389
+
390
+ /**
391
+ * The [[GridFilterItem]] representing this form.
392
+ */
341
393
  item: PropTypes.shape({
342
394
  columnField: PropTypes.string.isRequired,
343
395
  id: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
344
396
  operatorValue: PropTypes.string,
345
397
  value: PropTypes.any
346
398
  }).isRequired,
399
+
400
+ /**
401
+ * Props passed to the logic operator input component.
402
+ * @default {}
403
+ */
347
404
  linkOperatorInputProps: PropTypes.any,
405
+
406
+ /**
407
+ * Sets the available logic operators.
408
+ * @default [GridLinkOperator.And, GridLinkOperator.Or]
409
+ */
348
410
  linkOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),
411
+
412
+ /**
413
+ * The current logic operator applied.
414
+ */
349
415
  multiFilterOperator: PropTypes.oneOf(['and', 'or']),
416
+
417
+ /**
418
+ * Props passed to the operator input component.
419
+ * @default {}
420
+ */
350
421
  operatorInputProps: PropTypes.any,
422
+
423
+ /**
424
+ * If `true`, the logic operator field is visible.
425
+ */
351
426
  showMultiFilterOperators: PropTypes.bool,
427
+
428
+ /**
429
+ * Props passed to the value input component.
430
+ * @default {}
431
+ */
352
432
  valueInputProps: PropTypes.any
353
433
  } : void 0;
354
434
  export { GridFilterForm };
@@ -84,7 +84,6 @@ function GridFilterInputMultipleSingleSelect(props) {
84
84
  }, [applyValue, item]);
85
85
  return /*#__PURE__*/_jsx(Autocomplete, _extends({
86
86
  multiple: true,
87
- freeSolo: false,
88
87
  limitTags: 1,
89
88
  options: resolvedValueOptions // TODO: avoid `any`?
90
89
  ,
@@ -1,12 +1,15 @@
1
- /// <reference types="react" />
1
+ import * as React from 'react';
2
2
  import { SxProps, Theme } from '@mui/material/styles';
3
3
  import { GridFilterFormProps } from './GridFilterForm';
4
4
  export interface GridFilterPanelProps extends Pick<GridFilterFormProps, 'linkOperators' | 'columnsSort'> {
5
+ /**
6
+ * The system prop that allows defining system overrides as well as additional CSS styles.
7
+ */
5
8
  sx?: SxProps<Theme>;
9
+ /**
10
+ * Props passed to each filter form.
11
+ */
6
12
  filterFormProps?: Pick<GridFilterFormProps, 'columnsSort' | 'deleteIconProps' | 'linkOperatorInputProps' | 'operatorInputProps' | 'columnInputProps' | 'valueInputProps'>;
7
13
  }
8
- declare function GridFilterPanel(props: GridFilterPanelProps): JSX.Element;
9
- declare namespace GridFilterPanel {
10
- var propTypes: any;
11
- }
14
+ declare const GridFilterPanel: React.ForwardRefExoticComponent<GridFilterPanelProps & React.RefAttributes<HTMLDivElement>>;
12
15
  export { GridFilterPanel };
@@ -1,6 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- const _excluded = ["linkOperators", "columnsSort", "filterFormProps"];
3
+ const _excluded = ["linkOperators", "columnsSort", "filterFormProps", "children"];
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { GridLinkOperator } from '../../../models/gridFilterItem';
@@ -16,8 +16,7 @@ import { gridFilterModelSelector } from '../../../hooks/features/filter/gridFilt
16
16
  import { gridFilterableColumnDefinitionsSelector } from '../../../hooks/features/columns/gridColumnsSelector';
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
-
20
- function GridFilterPanel(props) {
19
+ const GridFilterPanel = /*#__PURE__*/React.forwardRef(function GridFilterPanel(props, ref) {
21
20
  var _rootProps$components;
22
21
 
23
22
  const apiRef = useGridApiContext();
@@ -73,9 +72,7 @@ function GridFilterPanel(props) {
73
72
  return;
74
73
  }
75
74
 
76
- apiRef.current.setFilterModel(_extends({}, filterModel, {
77
- items: [...items, defaultItem]
78
- }));
75
+ apiRef.current.upsertFilterItems([...items, defaultItem]);
79
76
  };
80
77
 
81
78
  const deleteFilter = React.useCallback(item => {
@@ -96,7 +93,9 @@ function GridFilterPanel(props) {
96
93
  lastFilterRef.current.focus();
97
94
  }
98
95
  }, [items.length]);
99
- return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({}, other, {
96
+ return /*#__PURE__*/_jsxs(GridPanelWrapper, _extends({
97
+ ref: ref
98
+ }, other, {
100
99
  children: [/*#__PURE__*/_jsx(GridPanelContent, {
101
100
  children: items.map((item, index) => /*#__PURE__*/_jsx(GridFilterForm, _extends({
102
101
  item: item,
@@ -121,14 +120,22 @@ function GridFilterPanel(props) {
121
120
  }))
122
121
  })]
123
122
  }));
124
- }
125
-
123
+ });
126
124
  process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
127
125
  // ----------------------------- Warning --------------------------------
128
126
  // | These PropTypes are generated from the TypeScript type definitions |
129
127
  // | To update them edit the TypeScript types and run "yarn proptypes" |
130
128
  // ----------------------------------------------------------------------
129
+
130
+ /**
131
+ * Changes how the options in the columns selector should be ordered.
132
+ * If not specified, the order is derived from the `columns` prop.
133
+ */
131
134
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
135
+
136
+ /**
137
+ * Props passed to each filter form.
138
+ */
132
139
  filterFormProps: PropTypes.shape({
133
140
  columnInputProps: PropTypes.any,
134
141
  columnsSort: PropTypes.oneOf(['asc', 'desc']),
@@ -137,7 +144,16 @@ process.env.NODE_ENV !== "production" ? GridFilterPanel.propTypes = {
137
144
  operatorInputProps: PropTypes.any,
138
145
  valueInputProps: PropTypes.any
139
146
  }),
147
+
148
+ /**
149
+ * Sets the available logic operators.
150
+ * @default [GridLinkOperator.And, GridLinkOperator.Or]
151
+ */
140
152
  linkOperators: PropTypes.arrayOf(PropTypes.oneOf(['and', 'or']).isRequired),
153
+
154
+ /**
155
+ * The system prop that allows defining system overrides as well as additional CSS styles.
156
+ */
141
157
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])
142
158
  } : void 0;
143
159
  export { GridFilterPanel };
@@ -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" | "sx" | "classes" | "componentsProps" | "components" | "onClose" | "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" | "componentsProps" | "TransitionComponent" | "TransitionProps" | "onOpen" | "placement" | "arrow" | "describeChild" | "disableFocusListener" | "disableHoverListener" | "disableInteractive" | "disableTouchListener" | "enterDelay" | "enterNextDelay" | "enterTouchDelay" | "followCursor" | "leaveDelay" | "leaveTouchDelay" | "PopperComponent" | "PopperProps"> & React.RefAttributes<HTMLButtonElement>>;
14
14
  export { GridToolbarFilterButton };
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { TextFieldProps } from '@mui/material/TextField';
3
+ import { GridFilterModel } from '../../models/gridFilterModel';
3
4
  export declare type GridToolbarQuickFilterProps = TextFieldProps & {
4
5
  /**
5
6
  * Function responsible for parsing text input in an array of independent values for quick filtering.
@@ -7,6 +8,12 @@ export declare type GridToolbarQuickFilterProps = TextFieldProps & {
7
8
  * @returns {any[]} The array of value on which quick filter is applied
8
9
  */
9
10
  quickFilterParser?: (input: string) => any[];
11
+ /**
12
+ * Function responsible for formatting values of quick filter in a string when the model is modified
13
+ * @param {any[]} values The new values passed to the quick filter model
14
+ * @returns {string} The string to display in the text field
15
+ */
16
+ quickFilterFormatter?: (values: GridFilterModel['quickFilterValues']) => string;
10
17
  /**
11
18
  * The debounce time in milliseconds.
12
19
  * @default 500