@mui/x-data-grid 9.7.0 → 9.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/CHANGELOG.md +249 -1
  2. package/DataGrid/DataGrid.js +7 -0
  3. package/DataGrid/DataGrid.mjs +7 -0
  4. package/components/GridColumnSortButton.d.mts +1 -1
  5. package/components/GridColumnSortButton.d.ts +1 -1
  6. package/components/GridColumnUnsortedIcon.d.mts +2 -1
  7. package/components/GridColumnUnsortedIcon.d.ts +2 -1
  8. package/components/GridHeader.d.mts +2 -1
  9. package/components/GridHeader.d.ts +2 -1
  10. package/components/GridHeaders.d.mts +1 -1
  11. package/components/GridHeaders.d.ts +1 -1
  12. package/components/GridPagination.d.mts +2 -1
  13. package/components/GridPagination.d.ts +2 -1
  14. package/components/GridRowDragAndDropOverlay.d.mts +1 -1
  15. package/components/GridRowDragAndDropOverlay.d.ts +1 -1
  16. package/components/GridScrollArea.d.mts +2 -1
  17. package/components/GridScrollArea.d.ts +2 -1
  18. package/components/GridScrollShadows.d.mts +2 -1
  19. package/components/GridScrollShadows.d.ts +2 -1
  20. package/components/GridScrollbarFillerCell.d.mts +1 -1
  21. package/components/GridScrollbarFillerCell.d.ts +1 -1
  22. package/components/base/GridFooterPlaceholder.d.mts +1 -1
  23. package/components/base/GridFooterPlaceholder.d.ts +1 -1
  24. package/components/base/GridFooterPlaceholder.js +1 -1
  25. package/components/base/GridFooterPlaceholder.mjs +1 -1
  26. package/components/base/GridOverlays.d.mts +1 -1
  27. package/components/base/GridOverlays.d.ts +1 -1
  28. package/components/cell/GridActionsCell.d.mts +2 -2
  29. package/components/cell/GridActionsCell.d.ts +2 -2
  30. package/components/cell/GridActionsCellItem.js +1 -58
  31. package/components/cell/GridActionsCellItem.mjs +1 -58
  32. package/components/cell/GridBooleanCell.d.mts +1 -1
  33. package/components/cell/GridBooleanCell.d.ts +1 -1
  34. package/components/cell/GridEditBooleanCell.d.mts +2 -2
  35. package/components/cell/GridEditBooleanCell.d.ts +2 -2
  36. package/components/cell/GridEditDateCell.d.mts +2 -2
  37. package/components/cell/GridEditDateCell.d.ts +2 -2
  38. package/components/cell/GridEditInputCell.d.mts +1 -1
  39. package/components/cell/GridEditInputCell.d.ts +1 -1
  40. package/components/cell/GridEditLongTextCell.d.mts +2 -2
  41. package/components/cell/GridEditLongTextCell.d.ts +2 -2
  42. package/components/cell/GridEditSingleSelectCell.d.mts +3 -2
  43. package/components/cell/GridEditSingleSelectCell.d.ts +3 -2
  44. package/components/cell/GridFooterCell.d.mts +1 -1
  45. package/components/cell/GridFooterCell.d.ts +1 -1
  46. package/components/cell/GridLongTextCell.d.mts +2 -2
  47. package/components/cell/GridLongTextCell.d.ts +2 -2
  48. package/components/cell/GridSkeletonCell.d.mts +1 -1
  49. package/components/cell/GridSkeletonCell.d.ts +1 -1
  50. package/components/columnHeaders/ColumnHeaderMenuIcon.d.mts +1 -1
  51. package/components/columnHeaders/ColumnHeaderMenuIcon.d.ts +1 -1
  52. package/components/columnHeaders/GridColumnGroupHeader.d.mts +1 -1
  53. package/components/columnHeaders/GridColumnGroupHeader.d.ts +1 -1
  54. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.mts +1 -1
  55. package/components/columnHeaders/GridColumnHeaderFilterIconButton.d.ts +1 -1
  56. package/components/columnHeaders/GridColumnHeaderItem.d.mts +1 -1
  57. package/components/columnHeaders/GridColumnHeaderItem.d.ts +1 -1
  58. package/components/columnHeaders/GridColumnHeaderSeparator.d.mts +1 -1
  59. package/components/columnHeaders/GridColumnHeaderSeparator.d.ts +1 -1
  60. package/components/columnHeaders/GridColumnHeaderSortIcon.d.mts +1 -1
  61. package/components/columnHeaders/GridColumnHeaderSortIcon.d.ts +1 -1
  62. package/components/columnHeaders/GridColumnHeaderTitle.d.mts +1 -1
  63. package/components/columnHeaders/GridColumnHeaderTitle.d.ts +1 -1
  64. package/components/columnsManagement/GridColumnsManagement.d.mts +2 -1
  65. package/components/columnsManagement/GridColumnsManagement.d.ts +2 -1
  66. package/components/menu/GridMenu.d.mts +1 -1
  67. package/components/menu/GridMenu.d.ts +1 -1
  68. package/components/menu/columnMenu/GridColumnHeaderMenu.d.mts +1 -1
  69. package/components/menu/columnMenu/GridColumnHeaderMenu.d.ts +1 -1
  70. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.mts +2 -1
  71. package/components/menu/columnMenu/menuItems/GridColumnMenuColumnsItem.d.ts +2 -1
  72. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.mts +2 -1
  73. package/components/menu/columnMenu/menuItems/GridColumnMenuFilterItem.d.ts +2 -1
  74. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.mts +2 -1
  75. package/components/menu/columnMenu/menuItems/GridColumnMenuHideItem.d.ts +2 -1
  76. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.mts +2 -1
  77. package/components/menu/columnMenu/menuItems/GridColumnMenuManageItem.d.ts +2 -1
  78. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.mts +2 -1
  79. package/components/menu/columnMenu/menuItems/GridColumnMenuSortItem.d.ts +2 -1
  80. package/components/panel/GridColumnsPanel.d.mts +1 -1
  81. package/components/panel/GridColumnsPanel.d.ts +1 -1
  82. package/components/panel/GridPanelContent.d.mts +1 -1
  83. package/components/panel/GridPanelContent.d.ts +1 -1
  84. package/components/panel/GridPanelContext.d.mts +1 -1
  85. package/components/panel/GridPanelContext.d.ts +1 -1
  86. package/components/panel/GridPanelFooter.d.mts +1 -1
  87. package/components/panel/GridPanelFooter.d.ts +1 -1
  88. package/components/panel/GridPanelHeader.d.mts +1 -1
  89. package/components/panel/GridPanelHeader.d.ts +1 -1
  90. package/components/panel/GridPreferencesPanel.d.mts +1 -1
  91. package/components/panel/GridPreferencesPanel.d.ts +1 -1
  92. package/components/panel/filterPanel/GridFilterForm.d.mts +1 -98
  93. package/components/panel/filterPanel/GridFilterForm.d.ts +1 -98
  94. package/components/panel/filterPanel/GridFilterForm.js +9 -355
  95. package/components/panel/filterPanel/GridFilterForm.mjs +8 -354
  96. package/components/panel/filterPanel/GridFilterFormBase.d.mts +119 -0
  97. package/components/panel/filterPanel/GridFilterFormBase.d.ts +119 -0
  98. package/components/panel/filterPanel/GridFilterFormBase.js +497 -0
  99. package/components/panel/filterPanel/GridFilterFormBase.mjs +491 -0
  100. package/components/panel/filterPanel/GridFilterInputBoolean.d.mts +2 -1
  101. package/components/panel/filterPanel/GridFilterInputBoolean.d.ts +2 -1
  102. package/components/panel/filterPanel/GridFilterInputBoolean.js +6 -1
  103. package/components/panel/filterPanel/GridFilterInputBoolean.mjs +6 -1
  104. package/components/panel/filterPanel/GridFilterInputDate.d.mts +2 -1
  105. package/components/panel/filterPanel/GridFilterInputDate.d.ts +2 -1
  106. package/components/panel/filterPanel/GridFilterInputDate.js +21 -9
  107. package/components/panel/filterPanel/GridFilterInputDate.mjs +21 -9
  108. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.mts +2 -1
  109. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.d.ts +2 -1
  110. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.js +6 -1
  111. package/components/panel/filterPanel/GridFilterInputMultipleSingleSelect.mjs +6 -1
  112. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.mts +2 -1
  113. package/components/panel/filterPanel/GridFilterInputMultipleValue.d.ts +2 -1
  114. package/components/panel/filterPanel/GridFilterInputMultipleValue.js +6 -1
  115. package/components/panel/filterPanel/GridFilterInputMultipleValue.mjs +6 -1
  116. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.mts +2 -1
  117. package/components/panel/filterPanel/GridFilterInputSingleSelect.d.ts +2 -1
  118. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +6 -1
  119. package/components/panel/filterPanel/GridFilterInputSingleSelect.mjs +6 -1
  120. package/components/panel/filterPanel/GridFilterInputValue.d.mts +2 -1
  121. package/components/panel/filterPanel/GridFilterInputValue.d.ts +2 -1
  122. package/components/panel/filterPanel/GridFilterInputValue.js +19 -8
  123. package/components/panel/filterPanel/GridFilterInputValue.mjs +19 -8
  124. package/components/panel/filterPanel/GridFilterPanel.d.mts +3 -40
  125. package/components/panel/filterPanel/GridFilterPanel.d.ts +3 -40
  126. package/components/panel/filterPanel/GridFilterPanel.js +19 -174
  127. package/components/panel/filterPanel/GridFilterPanel.mjs +14 -173
  128. package/components/panel/filterPanel/GridFilterPanelBase.d.mts +79 -0
  129. package/components/panel/filterPanel/GridFilterPanelBase.d.ts +79 -0
  130. package/components/panel/filterPanel/GridFilterPanelBase.js +304 -0
  131. package/components/panel/filterPanel/GridFilterPanelBase.mjs +297 -0
  132. package/components/panel/filterPanel/index.d.mts +3 -1
  133. package/components/panel/filterPanel/index.d.ts +3 -1
  134. package/components/panel/filterPanel/index.js +9 -1
  135. package/components/panel/filterPanel/index.mjs +3 -0
  136. package/components/quickFilter/QuickFilter.d.mts +1 -1
  137. package/components/quickFilter/QuickFilter.d.ts +1 -1
  138. package/components/toolbar/GridToolbarExport.d.mts +2 -2
  139. package/components/toolbar/GridToolbarExport.d.ts +2 -2
  140. package/components/toolbar/GridToolbarQuickFilter.d.mts +1 -1
  141. package/components/toolbar/GridToolbarQuickFilter.d.ts +1 -1
  142. package/components/toolbarV8/GridToolbar.d.mts +3 -3
  143. package/components/toolbarV8/GridToolbar.d.ts +3 -3
  144. package/components/virtualization/GridBottomContainer.d.mts +1 -1
  145. package/components/virtualization/GridBottomContainer.d.ts +1 -1
  146. package/components/virtualization/GridTopContainer.d.mts +1 -1
  147. package/components/virtualization/GridTopContainer.d.ts +1 -1
  148. package/components/virtualization/GridVirtualScroller.d.mts +1 -1
  149. package/components/virtualization/GridVirtualScroller.d.ts +1 -1
  150. package/components/virtualization/GridVirtualScrollerFiller.d.mts +2 -1
  151. package/components/virtualization/GridVirtualScrollerFiller.d.ts +2 -1
  152. package/constants/dataGridPropsDefaultValues.js +1 -0
  153. package/constants/dataGridPropsDefaultValues.mjs +1 -0
  154. package/context/GridContextProvider.d.mts +1 -1
  155. package/context/GridContextProvider.d.ts +1 -1
  156. package/hooks/features/columnHeaders/useGridColumnHeaders.d.mts +2 -2
  157. package/hooks/features/columnHeaders/useGridColumnHeaders.d.ts +2 -2
  158. package/hooks/features/dataSource/useGridDataSourceBase.d.mts +1 -1
  159. package/hooks/features/dataSource/useGridDataSourceBase.d.ts +1 -1
  160. package/hooks/features/dataSource/useGridDataSourceBase.js +39 -10
  161. package/hooks/features/dataSource/useGridDataSourceBase.mjs +39 -10
  162. package/hooks/features/editing/useGridCellEditing.js +14 -7
  163. package/hooks/features/editing/useGridCellEditing.mjs +14 -7
  164. package/hooks/features/filter/gridFilterUtils.d.mts +12 -0
  165. package/hooks/features/filter/gridFilterUtils.d.ts +12 -0
  166. package/hooks/features/filter/gridFilterUtils.js +56 -1
  167. package/hooks/features/filter/gridFilterUtils.mjs +52 -0
  168. package/hooks/features/filter/useGridFilter.js +4 -35
  169. package/hooks/features/filter/useGridFilter.mjs +5 -36
  170. package/hooks/features/rows/gridRowsUtils.js +1 -1
  171. package/hooks/features/rows/gridRowsUtils.mjs +1 -1
  172. package/hooks/utils/useGridEvent.js +1 -1
  173. package/hooks/utils/useGridEvent.mjs +1 -1
  174. package/index.js +1 -1
  175. package/index.mjs +1 -1
  176. package/internals/demo/TailwindDemoContainer.d.mts +1 -1
  177. package/internals/demo/TailwindDemoContainer.d.ts +1 -1
  178. package/locales/jaJP.js +4 -5
  179. package/locales/jaJP.mjs +4 -5
  180. package/models/gridFilterInputComponent.d.mts +5 -0
  181. package/models/gridFilterInputComponent.d.ts +5 -0
  182. package/models/gridSlotsComponentsProps.d.mts +1 -1
  183. package/models/gridSlotsComponentsProps.d.ts +1 -1
  184. package/models/props/DataGridProps.d.mts +7 -0
  185. package/models/props/DataGridProps.d.ts +7 -0
  186. package/package.json +4 -4
  187. package/utils/css/context.d.mts +3 -3
  188. package/utils/css/context.d.ts +3 -3
@@ -5,6 +5,58 @@ import { GridLogicOperator } from "../../../models/index.mjs";
5
5
  import { getDefaultGridFilterModel } from "./gridFilterState.mjs";
6
6
  import { getPublicApiRef } from "../../../utils/getPublicApiRef.mjs";
7
7
  import { gridColumnFieldsSelector, gridColumnLookupSelector, gridColumnVisibilityModelSelector } from "../columns/index.mjs";
8
+
9
+ /**
10
+ * Pure helpers computing a new filter model from an existing one.
11
+ * Shared by the imperative `apiRef` methods (`useGridFilter`) and the controlled
12
+ * filter panel (`GridFilterPanelBase`) so both paths produce identical models.
13
+ * Each helper returns the same model reference when nothing changes, so callers
14
+ * relying on referential equality can skip no-op updates.
15
+ */
16
+
17
+ export const upsertFilterItemInModel = (model, item) => {
18
+ const items = [...model.items];
19
+ const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);
20
+ if (itemIndex === -1) {
21
+ items.push(item);
22
+ } else {
23
+ items[itemIndex] = item;
24
+ }
25
+ return _extends({}, model, {
26
+ items
27
+ });
28
+ };
29
+ export const upsertFilterItemsInModel = (model, itemsToUpsert) => {
30
+ const items = [...model.items];
31
+ itemsToUpsert.forEach(item => {
32
+ const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);
33
+ if (itemIndex === -1) {
34
+ items.push(item);
35
+ } else {
36
+ items[itemIndex] = item;
37
+ }
38
+ });
39
+ return _extends({}, model, {
40
+ items
41
+ });
42
+ };
43
+ export const deleteFilterItemFromModel = (model, itemToDelete) => {
44
+ const items = model.items.filter(item => item.id !== itemToDelete.id);
45
+ if (items.length === model.items.length) {
46
+ return model;
47
+ }
48
+ return _extends({}, model, {
49
+ items
50
+ });
51
+ };
52
+ export const setFilterLogicOperatorInModel = (model, logicOperator) => {
53
+ if (model.logicOperator === logicOperator) {
54
+ return model;
55
+ }
56
+ return _extends({}, model, {
57
+ logicOperator
58
+ });
59
+ };
8
60
  let hasEval;
9
61
  function getHasEval() {
10
62
  if (hasEval !== undefined) {
@@ -89,41 +89,15 @@ const useGridFilter = (apiRef, props, configuration) => {
89
89
  */
90
90
  const upsertFilterItem = React.useCallback(item => {
91
91
  const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
92
- const items = [...filterModel.items];
93
- const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);
94
- if (itemIndex === -1) {
95
- items.push(item);
96
- } else {
97
- items[itemIndex] = item;
98
- }
99
- apiRef.current.setFilterModel((0, _extends2.default)({}, filterModel, {
100
- items
101
- }), 'upsertFilterItem');
92
+ apiRef.current.setFilterModel((0, _gridFilterUtils.upsertFilterItemInModel)(filterModel, item), 'upsertFilterItem');
102
93
  }, [apiRef]);
103
94
  const upsertFilterItems = React.useCallback(items => {
104
95
  const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
105
- const existingItems = [...filterModel.items];
106
- items.forEach(item => {
107
- const itemIndex = existingItems.findIndex(filterItem => filterItem.id === item.id);
108
- if (itemIndex === -1) {
109
- existingItems.push(item);
110
- } else {
111
- existingItems[itemIndex] = item;
112
- }
113
- });
114
- apiRef.current.setFilterModel((0, _extends2.default)({}, filterModel, {
115
- items: existingItems
116
- }), 'upsertFilterItems');
96
+ apiRef.current.setFilterModel((0, _gridFilterUtils.upsertFilterItemsInModel)(filterModel, items), 'upsertFilterItems');
117
97
  }, [apiRef]);
118
98
  const deleteFilterItem = React.useCallback(itemToDelete => {
119
99
  const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
120
- const items = filterModel.items.filter(item => item.id !== itemToDelete.id);
121
- if (items.length === filterModel.items.length) {
122
- return;
123
- }
124
- apiRef.current.setFilterModel((0, _extends2.default)({}, filterModel, {
125
- items
126
- }), 'deleteFilterItem');
100
+ apiRef.current.setFilterModel((0, _gridFilterUtils.deleteFilterItemFromModel)(filterModel, itemToDelete), 'deleteFilterItem');
127
101
  }, [apiRef]);
128
102
  const showFilterPanel = React.useCallback((targetColumnField, panelId, labelId) => {
129
103
  logger.debug('Displaying filter panel');
@@ -178,12 +152,7 @@ const useGridFilter = (apiRef, props, configuration) => {
178
152
  }, [apiRef, logger]);
179
153
  const setFilterLogicOperator = React.useCallback(logicOperator => {
180
154
  const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
181
- if (filterModel.logicOperator === logicOperator) {
182
- return;
183
- }
184
- apiRef.current.setFilterModel((0, _extends2.default)({}, filterModel, {
185
- logicOperator
186
- }), 'changeLogicOperator');
155
+ apiRef.current.setFilterModel((0, _gridFilterUtils.setFilterLogicOperatorInModel)(filterModel, logicOperator), 'changeLogicOperator');
187
156
  }, [apiRef]);
188
157
  const setQuickFilterValues = React.useCallback(values => {
189
158
  const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
@@ -15,7 +15,7 @@ import { useFirstRender } from "../../utils/useFirstRender.mjs";
15
15
  import { gridRowsLookupSelector } from "../rows/index.mjs";
16
16
  import { useGridRegisterPipeProcessor } from "../../core/pipeProcessing/index.mjs";
17
17
  import { GRID_DEFAULT_STRATEGY, useGridRegisterStrategyProcessor } from "../../core/strategyProcessing/index.mjs";
18
- import { buildAggregatedFilterApplier, sanitizeFilterModel, mergeStateWithFilterModel, cleanFilterItem, passFilterLogic, shouldQuickFilterExcludeHiddenColumns } from "./gridFilterUtils.mjs";
18
+ import { buildAggregatedFilterApplier, sanitizeFilterModel, mergeStateWithFilterModel, cleanFilterItem, passFilterLogic, shouldQuickFilterExcludeHiddenColumns, upsertFilterItemInModel, upsertFilterItemsInModel, deleteFilterItemFromModel, setFilterLogicOperatorInModel } from "./gridFilterUtils.mjs";
19
19
  import { jsx as _jsx } from "react/jsx-runtime";
20
20
  export const filterStateInitializer = (state, props, apiRef) => {
21
21
  const filterModel = props.filterModel ?? props.initialState?.filter?.filterModel ?? getDefaultGridFilterModel();
@@ -80,41 +80,15 @@ export const useGridFilter = (apiRef, props, configuration) => {
80
80
  */
81
81
  const upsertFilterItem = React.useCallback(item => {
82
82
  const filterModel = gridFilterModelSelector(apiRef);
83
- const items = [...filterModel.items];
84
- const itemIndex = items.findIndex(filterItem => filterItem.id === item.id);
85
- if (itemIndex === -1) {
86
- items.push(item);
87
- } else {
88
- items[itemIndex] = item;
89
- }
90
- apiRef.current.setFilterModel(_extends({}, filterModel, {
91
- items
92
- }), 'upsertFilterItem');
83
+ apiRef.current.setFilterModel(upsertFilterItemInModel(filterModel, item), 'upsertFilterItem');
93
84
  }, [apiRef]);
94
85
  const upsertFilterItems = React.useCallback(items => {
95
86
  const filterModel = gridFilterModelSelector(apiRef);
96
- const existingItems = [...filterModel.items];
97
- items.forEach(item => {
98
- const itemIndex = existingItems.findIndex(filterItem => filterItem.id === item.id);
99
- if (itemIndex === -1) {
100
- existingItems.push(item);
101
- } else {
102
- existingItems[itemIndex] = item;
103
- }
104
- });
105
- apiRef.current.setFilterModel(_extends({}, filterModel, {
106
- items: existingItems
107
- }), 'upsertFilterItems');
87
+ apiRef.current.setFilterModel(upsertFilterItemsInModel(filterModel, items), 'upsertFilterItems');
108
88
  }, [apiRef]);
109
89
  const deleteFilterItem = React.useCallback(itemToDelete => {
110
90
  const filterModel = gridFilterModelSelector(apiRef);
111
- const items = filterModel.items.filter(item => item.id !== itemToDelete.id);
112
- if (items.length === filterModel.items.length) {
113
- return;
114
- }
115
- apiRef.current.setFilterModel(_extends({}, filterModel, {
116
- items
117
- }), 'deleteFilterItem');
91
+ apiRef.current.setFilterModel(deleteFilterItemFromModel(filterModel, itemToDelete), 'deleteFilterItem');
118
92
  }, [apiRef]);
119
93
  const showFilterPanel = React.useCallback((targetColumnField, panelId, labelId) => {
120
94
  logger.debug('Displaying filter panel');
@@ -169,12 +143,7 @@ export const useGridFilter = (apiRef, props, configuration) => {
169
143
  }, [apiRef, logger]);
170
144
  const setFilterLogicOperator = React.useCallback(logicOperator => {
171
145
  const filterModel = gridFilterModelSelector(apiRef);
172
- if (filterModel.logicOperator === logicOperator) {
173
- return;
174
- }
175
- apiRef.current.setFilterModel(_extends({}, filterModel, {
176
- logicOperator
177
- }), 'changeLogicOperator');
146
+ apiRef.current.setFilterModel(setFilterLogicOperatorInModel(filterModel, logicOperator), 'changeLogicOperator');
178
147
  }, [apiRef]);
179
148
  const setQuickFilterValues = React.useCallback(values => {
180
149
  const filterModel = gridFilterModelSelector(apiRef);
@@ -155,7 +155,7 @@ const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowN
155
155
  exports.isAutogeneratedRowNode = isAutogeneratedRowNode;
156
156
  const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows, directChildrenOnly) => {
157
157
  const node = tree[parentId];
158
- if (node.type !== 'group') {
158
+ if (node?.type !== 'group') {
159
159
  return [];
160
160
  }
161
161
  const validDescendants = [];
@@ -137,7 +137,7 @@ export const isAutogeneratedRow = row => GRID_ID_AUTOGENERATED in row;
137
137
  export const isAutogeneratedRowNode = rowNode => rowNode.type === 'skeletonRow' || rowNode.type === 'footer' || rowNode.type === 'group' && rowNode.isAutoGenerated || rowNode.type === 'pinnedRow' && rowNode.isAutoGenerated;
138
138
  export const getTreeNodeDescendants = (tree, parentId, skipAutoGeneratedRows, directChildrenOnly) => {
139
139
  const node = tree[parentId];
140
- if (node.type !== 'group') {
140
+ if (node?.type !== 'group') {
141
141
  return [];
142
142
  }
143
143
  const validDescendants = [];
@@ -13,7 +13,7 @@ var React = _interopRequireWildcard(require("react"));
13
13
  var _TimerBasedCleanupTracking = require("../../utils/cleanupTracking/TimerBasedCleanupTracking");
14
14
  var _FinalizationRegistryBasedCleanupTracking = require("../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking");
15
15
  // Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
16
- // Check https://github.com/facebook/react/issues/15317 to get more information
16
+ // Check https://github.com/react/react/issues/15317 to get more information
17
17
 
18
18
  // We use class to make it easier to detect in heap snapshots by name
19
19
  class ObjectToBeRetainedByReact {
@@ -4,7 +4,7 @@ import * as React from 'react';
4
4
  import { TimerBasedCleanupTracking } from "../../utils/cleanupTracking/TimerBasedCleanupTracking.mjs";
5
5
  import { FinalizationRegistryBasedCleanupTracking } from "../../utils/cleanupTracking/FinalizationRegistryBasedCleanupTracking.mjs";
6
6
  // Based on https://github.com/Bnaya/use-dispose-uncommitted/blob/main/src/finalization-registry-based-impl.ts
7
- // Check https://github.com/facebook/react/issues/15317 to get more information
7
+ // Check https://github.com/react/react/issues/15317 to get more information
8
8
 
9
9
  // We use class to make it easier to detect in heap snapshots by name
10
10
  class ObjectToBeRetainedByReact {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v9.7.0
2
+ * @mui/x-data-grid v9.9.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v9.7.0
2
+ * @mui/x-data-grid v9.9.0
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -7,5 +7,5 @@ interface TailwindDemoContainerProps {
7
7
  * WARNING: This is an internal component used in documentation to inject the Tailwind script.
8
8
  * Please do not use it in your application.
9
9
  */
10
- export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
10
+ export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
11
11
  export {};
@@ -7,5 +7,5 @@ interface TailwindDemoContainerProps {
7
7
  * WARNING: This is an internal component used in documentation to inject the Tailwind script.
8
8
  * Please do not use it in your application.
9
9
  */
10
- export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
10
+ export declare function TailwindDemoContainer(props: TailwindDemoContainerProps): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | React.JSX.Element | null | undefined;
11
11
  export {};
package/locales/jaJP.js CHANGED
@@ -10,8 +10,8 @@ const jaJPGrid = {
10
10
  // Root
11
11
  noRowsLabel: '行がありません。',
12
12
  noResultsOverlayLabel: '結果がありません。',
13
- // noColumnsOverlayLabel: 'No columns',
14
- // noColumnsOverlayManageColumns: 'Manage columns',
13
+ noColumnsOverlayLabel: '列がありません。',
14
+ noColumnsOverlayManageColumns: '列管理',
15
15
  // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
16
16
 
17
17
  // Density selector toolbar button text
@@ -56,8 +56,7 @@ const jaJPGrid = {
56
56
  columnsManagementNoColumns: 'カラムなし',
57
57
  columnsManagementShowHideAllText: 'すべて表示/非表示',
58
58
  columnsManagementReset: 'リセット',
59
- // columnsManagementDeleteIconLabel: 'Clear',
60
-
59
+ columnsManagementDeleteIconLabel: 'クリア',
61
60
  // Filter panel text
62
61
  filterPanelAddFilter: 'フィルター追加',
63
62
  filterPanelRemoveAll: 'すべて削除',
@@ -120,7 +119,7 @@ const jaJPGrid = {
120
119
  filterValueFalse: '偽',
121
120
  // Column menu text
122
121
  columnMenuLabel: 'メニュー',
123
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
122
+ columnMenuAriaLabel: columnName => `${columnName} 列メニュー`,
124
123
  columnMenuShowColumns: '列表示',
125
124
  columnMenuManageColumns: '列管理',
126
125
  columnMenuFilter: 'フィルター',
package/locales/jaJP.mjs CHANGED
@@ -4,8 +4,8 @@ const jaJPGrid = {
4
4
  // Root
5
5
  noRowsLabel: '行がありません。',
6
6
  noResultsOverlayLabel: '結果がありません。',
7
- // noColumnsOverlayLabel: 'No columns',
8
- // noColumnsOverlayManageColumns: 'Manage columns',
7
+ noColumnsOverlayLabel: '列がありません。',
8
+ noColumnsOverlayManageColumns: '列管理',
9
9
  // emptyPivotOverlayLabel: 'Add fields to rows, columns, and values to create a pivot table',
10
10
 
11
11
  // Density selector toolbar button text
@@ -50,8 +50,7 @@ const jaJPGrid = {
50
50
  columnsManagementNoColumns: 'カラムなし',
51
51
  columnsManagementShowHideAllText: 'すべて表示/非表示',
52
52
  columnsManagementReset: 'リセット',
53
- // columnsManagementDeleteIconLabel: 'Clear',
54
-
53
+ columnsManagementDeleteIconLabel: 'クリア',
55
54
  // Filter panel text
56
55
  filterPanelAddFilter: 'フィルター追加',
57
56
  filterPanelRemoveAll: 'すべて削除',
@@ -114,7 +113,7 @@ const jaJPGrid = {
114
113
  filterValueFalse: '偽',
115
114
  // Column menu text
116
115
  columnMenuLabel: 'メニュー',
117
- // columnMenuAriaLabel: (columnName: string) => `${columnName} column menu`,
116
+ columnMenuAriaLabel: columnName => `${columnName} 列メニュー`,
118
117
  columnMenuShowColumns: '列表示',
119
118
  columnMenuManageColumns: '列管理',
120
119
  columnMenuFilter: 'フィルター',
@@ -26,6 +26,11 @@ export type GridFilterInputValueProps<T extends GridFilterInputSlotProps = GridF
26
26
  tabIndex?: number;
27
27
  disabled?: boolean;
28
28
  className?: string;
29
+ /**
30
+ * If `true`, filter value changes are applied immediately without debouncing.
31
+ * @default false
32
+ */
33
+ disableDebounce?: boolean;
29
34
  slotProps?: {
30
35
  root: T;
31
36
  };
@@ -26,6 +26,11 @@ export type GridFilterInputValueProps<T extends GridFilterInputSlotProps = GridF
26
26
  tabIndex?: number;
27
27
  disabled?: boolean;
28
28
  className?: string;
29
+ /**
30
+ * If `true`, filter value changes are applied immediately without debouncing.
31
+ * @default false
32
+ */
33
+ disableDebounce?: boolean;
29
34
  slotProps?: {
30
35
  root: T;
31
36
  };
@@ -3,7 +3,7 @@ import type { GridToolbarProps } from "../components/toolbar/GridToolbar.mjs";
3
3
  import type { ColumnHeaderFilterIconButtonProps } from "../components/columnHeaders/GridColumnHeaderFilterIconButton.mjs";
4
4
  import type { GridColumnMenuProps } from "../components/menu/columnMenu/GridColumnMenuProps.mjs";
5
5
  import type { GridColumnsPanelProps } from "../components/panel/GridColumnsPanel.mjs";
6
- import type { GridFilterPanelProps } from "../components/panel/filterPanel/GridFilterPanel.mjs";
6
+ import type { GridFilterPanelProps } from "../components/panel/filterPanel/GridFilterPanelBase.mjs";
7
7
  import type { GridFooterContainerProps } from "../components/containers/GridFooterContainer.mjs";
8
8
  import type { GridOverlayProps } from "../components/containers/GridOverlay.mjs";
9
9
  import type { GridPanelProps } from "../components/panel/GridPanel.mjs";
@@ -3,7 +3,7 @@ import type { GridToolbarProps } from "../components/toolbar/GridToolbar.js";
3
3
  import type { ColumnHeaderFilterIconButtonProps } from "../components/columnHeaders/GridColumnHeaderFilterIconButton.js";
4
4
  import type { GridColumnMenuProps } from "../components/menu/columnMenu/GridColumnMenuProps.js";
5
5
  import type { GridColumnsPanelProps } from "../components/panel/GridColumnsPanel.js";
6
- import type { GridFilterPanelProps } from "../components/panel/filterPanel/GridFilterPanel.js";
6
+ import type { GridFilterPanelProps } from "../components/panel/filterPanel/GridFilterPanelBase.js";
7
7
  import type { GridFooterContainerProps } from "../components/containers/GridFooterContainer.js";
8
8
  import type { GridOverlayProps } from "../components/containers/GridOverlay.js";
9
9
  import type { GridPanelProps } from "../components/panel/GridPanel.js";
@@ -341,6 +341,13 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
341
341
  * @default 0
342
342
  */
343
343
  dataSourceRevalidateMs: number;
344
+ /**
345
+ * If `true`, the previously displayed rows are kept visible while new rows are being fetched after pagination, sorting, or filtering changes.
346
+ * The loading overlay is rendered on top of the previous rows.
347
+ * Only applies to flat data; tree data and row grouping always reset the rows on refetch to keep the order consistent with the new response.
348
+ * @default false
349
+ */
350
+ dataSourceKeepPreviousData: boolean;
344
351
  /**
345
352
  * If `true`, reordering columns is disabled.
346
353
  * @default false
@@ -341,6 +341,13 @@ export interface DataGridPropsWithDefaultValues<R extends GridValidRowModel = an
341
341
  * @default 0
342
342
  */
343
343
  dataSourceRevalidateMs: number;
344
+ /**
345
+ * If `true`, the previously displayed rows are kept visible while new rows are being fetched after pagination, sorting, or filtering changes.
346
+ * The loading overlay is rendered on top of the previous rows.
347
+ * Only applies to flat data; tree data and row grouping always reset the rows on refetch to keep the order consistent with the new response.
348
+ * @default false
349
+ */
350
+ dataSourceKeepPreviousData: boolean;
344
351
  /**
345
352
  * If `true`, reordering columns is disabled.
346
353
  * @default false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid",
3
- "version": "9.7.0",
3
+ "version": "9.9.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Community plan edition of the MUI X Data Grid components.",
6
6
  "license": "MIT",
@@ -39,12 +39,12 @@
39
39
  "dependencies": {
40
40
  "@babel/runtime": "^7.29.7",
41
41
  "@base-ui/utils": "^0.3.0",
42
- "@mui/utils": "^9.1.1",
42
+ "@mui/utils": "^9.2.0",
43
43
  "clsx": "^2.1.1",
44
44
  "prop-types": "^15.8.1",
45
45
  "use-sync-external-store": "^1.6.0",
46
- "@mui/x-internals": "^9.7.0",
47
- "@mui/x-virtualizer": "0.5.0"
46
+ "@mui/x-internals": "^9.9.0",
47
+ "@mui/x-virtualizer": "0.6.0"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "@emotion/react": "^11.9.0",
@@ -2,13 +2,13 @@ import * as React from 'react';
2
2
  export declare function useCSSVariablesClass(): string;
3
3
  export declare function useCSSVariablesContext(): {
4
4
  className: string;
5
- tag: import("react/jsx-runtime").JSX.Element;
5
+ tag: React.JSX.Element;
6
6
  };
7
7
  export declare function GridPortalWrapper({
8
8
  children
9
9
  }: {
10
10
  children: React.ReactNode;
11
- }): import("react/jsx-runtime").JSX.Element;
11
+ }): React.JSX.Element;
12
12
  export declare function GridCSSVariablesContext(props: {
13
13
  children: any;
14
- }): import("react/jsx-runtime").JSX.Element;
14
+ }): React.JSX.Element;
@@ -2,13 +2,13 @@ import * as React from 'react';
2
2
  export declare function useCSSVariablesClass(): string;
3
3
  export declare function useCSSVariablesContext(): {
4
4
  className: string;
5
- tag: import("react/jsx-runtime").JSX.Element;
5
+ tag: React.JSX.Element;
6
6
  };
7
7
  export declare function GridPortalWrapper({
8
8
  children
9
9
  }: {
10
10
  children: React.ReactNode;
11
- }): import("react/jsx-runtime").JSX.Element;
11
+ }): React.JSX.Element;
12
12
  export declare function GridCSSVariablesContext(props: {
13
13
  children: any;
14
- }): import("react/jsx-runtime").JSX.Element;
14
+ }): React.JSX.Element;