@mui/x-data-grid 8.11.1 → 8.11.3

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 (46) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/DataGrid/DataGrid.js +5 -0
  3. package/components/GridShadowScrollArea.js +2 -2
  4. package/components/GridSkeletonLoadingOverlay.js +2 -2
  5. package/components/columnSelection/GridHeaderCheckbox.js +2 -2
  6. package/components/columnsManagement/GridColumnsManagement.js +1 -1
  7. package/components/panel/filterPanel/GridFilterInputBoolean.js +2 -2
  8. package/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -2
  9. package/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  10. package/components/quickFilter/QuickFilterControl.js +1 -1
  11. package/constants/dataGridPropsDefaultValues.js +1 -0
  12. package/esm/DataGrid/DataGrid.js +5 -0
  13. package/esm/components/GridShadowScrollArea.js +2 -2
  14. package/esm/components/GridSkeletonLoadingOverlay.js +2 -2
  15. package/esm/components/columnSelection/GridHeaderCheckbox.js +2 -2
  16. package/esm/components/columnsManagement/GridColumnsManagement.js +1 -1
  17. package/esm/components/panel/filterPanel/GridFilterInputBoolean.js +2 -2
  18. package/esm/components/panel/filterPanel/GridFilterInputSingleSelect.js +2 -2
  19. package/esm/components/panel/filterPanel/GridFilterInputValue.js +2 -2
  20. package/esm/components/quickFilter/QuickFilterControl.js +1 -1
  21. package/esm/constants/dataGridPropsDefaultValues.js +1 -0
  22. package/esm/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  23. package/esm/hooks/features/rowSelection/useGridRowSelection.js +2 -2
  24. package/esm/hooks/features/rows/gridRowsSelector.d.ts +6 -0
  25. package/esm/hooks/features/rows/gridRowsSelector.js +8 -0
  26. package/esm/hooks/features/rows/index.d.ts +1 -1
  27. package/esm/hooks/features/rows/index.js +1 -1
  28. package/esm/index.js +1 -1
  29. package/esm/material/index.js +35 -35
  30. package/esm/material/variables.js +31 -3
  31. package/esm/models/gridFilterItem.d.ts +4 -2
  32. package/esm/models/gridFilterOperator.d.ts +1 -1
  33. package/esm/models/props/DataGridProps.d.ts +5 -0
  34. package/hooks/features/rowSelection/useGridRowSelection.d.ts +1 -1
  35. package/hooks/features/rowSelection/useGridRowSelection.js +2 -2
  36. package/hooks/features/rows/gridRowsSelector.d.ts +6 -0
  37. package/hooks/features/rows/gridRowsSelector.js +8 -0
  38. package/hooks/features/rows/index.d.ts +1 -1
  39. package/hooks/features/rows/index.js +7 -0
  40. package/index.js +1 -1
  41. package/material/index.js +35 -35
  42. package/material/variables.js +30 -2
  43. package/models/gridFilterItem.d.ts +4 -2
  44. package/models/gridFilterOperator.d.ts +1 -1
  45. package/models/props/DataGridProps.d.ts +5 -0
  46. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -5,6 +5,187 @@
5
5
  All notable changes to this project will be documented in this file.
6
6
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
7
 
8
+ ## 8.11.3
9
+
10
+ _Sep 16, 2025_
11
+
12
+ We'd like to extend a big thank you to the 11 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🐞 Bugfixes
15
+ - 📚 Documentation improvements
16
+
17
+ Special thanks go out to the community members for their valuable contributions:
18
+ @sai6855
19
+
20
+ The following are all team members who have contributed to this release:
21
+ @alexfauquette, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @Janpot, @JCQuintas, @LukasTy, @rita-codes, @siriwatknp
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@8.11.3`
26
+
27
+ - [DataGrid] Fix numeric font size not being applied (#19552) @cherniavskii
28
+ - [DataGrid] Improve `operator` types to display literal values (#19529) @siriwatknp
29
+
30
+ #### `@mui/x-data-grid-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
31
+
32
+ Same changes as in `@mui/x-data-grid@8.11.3`.
33
+
34
+ #### `@mui/x-data-grid-premium@8.11.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link "Premium plan")
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@8.11.3`.
37
+
38
+ ### Date and Time Pickers
39
+
40
+ #### `@mui/x-date-pickers@8.11.3`
41
+
42
+ - [pickers] Refactor `slots` and `slotProps` propagation strategy (#18867) @LukasTy
43
+
44
+ #### `@mui/x-date-pickers-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
45
+
46
+ Same changes as in `@mui/x-date-pickers@8.11.3`.
47
+
48
+ ### Charts
49
+
50
+ #### `@mui/x-charts@8.11.3`
51
+
52
+ - [charts] Add `inline-` piecewise legend options (#19382) @JCQuintas
53
+ - [charts] Add bar gradient example (#19174) @bernardobelchior
54
+ - [charts] Ignore empty tick labels in label overlap computation (#19547) @alexfauquette
55
+ - [charts] Rename `isBandScale` to `isDiscreteScale` (#19514) @bernardobelchior
56
+ - [charts] Fix legend position affecting toolbar's position (#19257) @sai6855
57
+
58
+ #### `@mui/x-charts-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
59
+
60
+ Same changes as in `@mui/x-charts@8.11.3`, plus:
61
+
62
+ - [charts-pro] Add chart title and caption to export demo (#19524) @bernardobelchior
63
+
64
+ ### Tree View
65
+
66
+ #### `@mui/x-tree-view@8.11.3`
67
+
68
+ - [tree view] Stop looping through all items to publish the `removeItem` event (#19500) @flaviendelangle
69
+ - [tree view] Support flat DOM structure (#19350) @flaviendelangle
70
+ - [tree view] Update cursor styles for disabled TreeItem (#19548) @sai6855
71
+
72
+ #### `@mui/x-tree-view-pro@8.11.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link "Pro plan")
73
+
74
+ Same changes as in `@mui/x-tree-view@8.11.3`.
75
+
76
+ ### Codemod
77
+
78
+ #### `@mui/x-codemod@8.11.3`
79
+
80
+ Internal changes.
81
+
82
+ ### Docs
83
+
84
+ - [docs] Add styling row group recipe (#19349) @siriwatknp
85
+ - [docs] Group demos data into the dataset folder (#19549) @alexfauquette
86
+ - [docs] Add `shiny` bar chart example at the top (#19416) @JCQuintas
87
+
88
+ ### Core
89
+
90
+ - [code-infra] Axios update (#19577) @Janpot
91
+ - [code-infra] Remove usage of copy-files command from code-infra (#19518) @brijeshb42
92
+ - [internal] Fix naming to match convention @oliviertassinari
93
+
94
+ ## 8.11.2
95
+
96
+ _Sep 10, 2025_
97
+
98
+ We'd like to extend a big thank you to the 13 contributors who made this release possible. Here are some highlights ✨:
99
+
100
+ - 🐞 Bugfixes
101
+ - 📚 Documentation improvements
102
+
103
+ Special thanks go out to the community members for their valuable contributions:
104
+ @ludvigeriksson, @sai6855
105
+
106
+ The following are all team members who have contributed to this release:
107
+ @alexfauquette, @bernardobelchior, @brijeshb42, @flaviendelangle, @Janpot, @LukasTy, @MBilalShafi, @noraleonte, @rita-codes, @romgrk, @siriwatknp
108
+
109
+ ### Data Grid
110
+
111
+ #### `@mui/x-data-grid@8.11.2`
112
+
113
+ - [DataGrid] Allow opting out of the exclude row selection model (#19423) @MBilalShafi
114
+ - [DataGrid] Fix column dropdown menu text alignment for the "Unpin" menu item (#19462) @MBilalShafi
115
+ - [DataGrid] Fix indeterminate state for "Select all" checkbox with exclude model (#19466) @MBilalShafi
116
+ - [DataGrid] Fix styled API arguments error (#19460) @MBilalShafi
117
+ - [DataGrid] Fix `stringify()` for theme objects (#19427) @romgrk
118
+
119
+ #### `@mui/x-data-grid-pro@8.11.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
120
+
121
+ Same changes as in `@mui/x-data-grid@8.11.2`.
122
+
123
+ #### `@mui/x-data-grid-premium@8.11.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
124
+
125
+ Same changes as in `@mui/x-data-grid-pro@8.11.2`, plus:
126
+
127
+ - [DataGridPremium] Fallback to the regular reorder method for plain data (#19467) @MBilalShafi
128
+ - [DataGridPremium] Fix showing `0` as total aggregation value when aggregation position is set to `null` for row groups (#19515) @cherniavskii
129
+
130
+ ### Date and Time Pickers
131
+
132
+ #### `@mui/x-date-pickers@8.11.2`
133
+
134
+ - [pickers] Gracefully handle `textField.slotProps` (#18980) @LukasTy
135
+ - [pickers] Improve hour and minute placement in Date Time Picker (#19227) @MBilalShafi
136
+ - [pickers] Use `calendarState.currentMonth` in Month Calendar when available (#19073) @LukasTy
137
+ - [pickers] Improve invalid value pasting into a section (#19357) @sai6855
138
+ - [fields] Remove redundant `id` and `aria-labelledby` attributes from spinbuttons (#19523) @LukasTy
139
+
140
+ #### `@mui/x-date-pickers-pro@8.11.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
141
+
142
+ Same changes as in `@mui/x-date-pickers@8.11.2`.
143
+
144
+ ### Charts
145
+
146
+ #### `@mui/x-charts@8.11.2`
147
+
148
+ - [charts] Fix highlight regression (#19486) @alexfauquette
149
+ - [charts] Improve code reuse in `ChartsXAxis` and `ChartsYAxis` (#19198) @bernardobelchior
150
+ - [charts] Simplify params in `getRange` and `createDateFormatter` (#19517) @bernardobelchior
151
+ - [charts] Handle domain edge cases with `filterMode: 'discard'` (#19199) @bernardobelchior
152
+ - [l10n] Add Swedish (sv-SE) locale (#19489) @ludvigeriksson
153
+
154
+ #### `@mui/x-charts-pro@8.11.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
155
+
156
+ Same changes as in `@mui/x-charts@8.11.2`.
157
+
158
+ ### Tree View
159
+
160
+ #### `@mui/x-tree-view@8.11.2`
161
+
162
+ - [TreeView] Do not mutate `props.items` in the `getItemTree()` method (#19483) @flaviendelangle
163
+ - [TreeView] Expose a new hook to apply selection propagation on the selected items (#19402) @flaviendelangle
164
+
165
+ #### `@mui/x-tree-view-pro@8.11.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
166
+
167
+ Same changes as in `@mui/x-tree-view@8.11.2`.
168
+
169
+ ### Codemod
170
+
171
+ #### `@mui/x-codemod@8.11.2`
172
+
173
+ Internal changes.
174
+
175
+ ### Docs
176
+
177
+ - [docs] Add recipe for save and manage filters from the panel (#19361) @siriwatknp
178
+
179
+ ### Core
180
+
181
+ - [code-infra] Remove log when restarting dev server (#19490) @bernardobelchior
182
+ - [code-infra] Store test results in CI (#19507) @Janpot
183
+
184
+ ### Miscellaneous
185
+
186
+ - [infra] Set nodejs versions of various CIs to 22.18 (#19503) @brijeshb42
187
+ - [test] Split infinitive @romgrk
188
+
8
189
  ## 8.11.1
9
190
 
10
191
  _Sep 4, 2025_
@@ -226,6 +226,11 @@ DataGridRaw.propTypes = {
226
226
  * @default false (`!props.checkboxSelection` for MIT Data Grid)
227
227
  */
228
228
  disableMultipleRowSelection: _propTypes.default.bool,
229
+ /**
230
+ * If `true`, the Data Grid will not use the exclude model optimization when selecting all rows.
231
+ * @default false
232
+ */
233
+ disableRowSelectionExcludeModel: _propTypes.default.bool,
229
234
  /**
230
235
  * If `true`, the selection on click on a row or cell is disabled.
231
236
  * @default false
@@ -86,8 +86,8 @@ const GridShadowScrollArea = exports.GridShadowScrollArea = (0, _forwardRef.forw
86
86
  const {
87
87
  children
88
88
  } = props,
89
- rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
90
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShadowScrollArea, (0, _extends2.default)({}, rest, {
89
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
90
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ShadowScrollArea, (0, _extends2.default)({}, other, {
91
91
  ref: ref,
92
92
  children: children
93
93
  }));
@@ -70,7 +70,7 @@ const GridSkeletonLoadingOverlayInner = exports.GridSkeletonLoadingOverlayInner
70
70
  visibleColumns,
71
71
  showFirstRowBorder
72
72
  } = props,
73
- rest = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
73
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
74
74
  const allVisibleColumns = (0, _hooks.useGridSelector)(apiRef, _hooks.gridVisibleColumnDefinitionsSelector);
75
75
  const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);
76
76
  const pinnedColumns = (0, _hooks.useGridSelector)(apiRef, _hooks.gridVisiblePinnedColumnDefinitionsSelector);
@@ -189,7 +189,7 @@ const GridSkeletonLoadingOverlayInner = exports.GridSkeletonLoadingOverlayInner
189
189
  (0, _hooks.useGridEvent)(apiRef, 'columnResize', handleColumnResize);
190
190
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(SkeletonOverlay, (0, _extends2.default)({
191
191
  className: classes.root
192
- }, rest, {
192
+ }, other, {
193
193
  ref: handleRef,
194
194
  children: children
195
195
  }));
@@ -107,7 +107,7 @@ const GridHeaderCheckbox = exports.GridHeaderCheckbox = (0, _forwardRef.forwardR
107
107
  return size;
108
108
  }, [filteredSelection, selectionCandidates]);
109
109
  const isIndeterminate = React.useMemo(() => {
110
- if (filteredSelection.ids.size === 0) {
110
+ if (currentSelectionSize === 0) {
111
111
  return false;
112
112
  }
113
113
  const selectionManager = (0, _gridRowSelectionManager.createRowSelectionManager)(filteredSelection);
@@ -117,7 +117,7 @@ const GridHeaderCheckbox = exports.GridHeaderCheckbox = (0, _forwardRef.forwardR
117
117
  }
118
118
  }
119
119
  return false;
120
- }, [filteredSelection, selectionCandidates]);
120
+ }, [currentSelectionSize, filteredSelection, selectionCandidates]);
121
121
  const isChecked = currentSelectionSize > 0;
122
122
  const handleChange = event => {
123
123
  const params = {
@@ -320,4 +320,4 @@ const GridColumnsManagementEmptyText = (0, _styles.styled)('div', {
320
320
  const GridColumnsManagementRow = (0, _styles.styled)(_assert.NotRendered, {
321
321
  name: 'MuiDataGrid',
322
322
  slot: 'ColumnsManagementRow'
323
- })();
323
+ })({});
@@ -28,7 +28,7 @@ function GridFilterInputBoolean(props) {
28
28
  tabIndex,
29
29
  slotProps
30
30
  } = props,
31
- others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
31
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
32
32
  const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
33
33
  const rootProps = (0, _useGridRootProps.useGridRootProps)();
34
34
  const labelId = (0, _useId.default)();
@@ -63,7 +63,7 @@ function GridFilterInputBoolean(props) {
63
63
  tabIndex
64
64
  }, rootSlotProps?.htmlInput)
65
65
  }
66
- }, baseSelectProps, others, slotProps?.root, {
66
+ }, baseSelectProps, other, slotProps?.root, {
67
67
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseSelectOption, (0, _extends2.default)({}, baseSelectOptionProps, {
68
68
  native: isSelectNative,
69
69
  value: "",
@@ -50,7 +50,7 @@ function GridFilterInputSingleSelect(props) {
50
50
  headerFilterMenu,
51
51
  slotProps
52
52
  } = props,
53
- others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
53
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
54
54
  const filterValue = item.value ?? '';
55
55
  const id = (0, _useId.default)();
56
56
  const labelId = (0, _useId.default)();
@@ -92,7 +92,7 @@ function GridFilterInputSingleSelect(props) {
92
92
  }, slotProps?.root.slotProps?.htmlInput)
93
93
  },
94
94
  native: isSelectNative
95
- }, rootProps.slotProps?.baseSelect, others, slotProps?.root, {
95
+ }, rootProps.slotProps?.baseSelect, other, slotProps?.root, {
96
96
  children: renderSingleSelectOptions({
97
97
  column: resolvedColumn,
98
98
  OptionComponent: rootProps.slots.baseSelectOption,
@@ -29,7 +29,7 @@ function GridFilterInputValue(props) {
29
29
  clearButton,
30
30
  headerFilterMenu
31
31
  } = props,
32
- others = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
32
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
33
33
  const textFieldProps = slotProps?.root;
34
34
  const filterTimeout = (0, _useTimeout.useTimeout)();
35
35
  const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
@@ -76,7 +76,7 @@ function GridFilterInputValue(props) {
76
76
  }, textFieldProps?.slotProps?.htmlInput)
77
77
  }),
78
78
  inputRef: focusElementRef
79
- }, rootProps.slotProps?.baseTextField, others, textFieldProps)), headerFilterMenu, clearButton]
79
+ }, rootProps.slotProps?.baseTextField, other, textFieldProps)), headerFilterMenu, clearButton]
80
80
  });
81
81
  }
82
82
  function sanitizeFilterItemValue(value) {
@@ -126,6 +126,6 @@ process.env.NODE_ENV !== "production" ? QuickFilterControl.propTypes = {
126
126
  slotProps: _propTypes.default.object,
127
127
  style: _propTypes.default.object,
128
128
  tabIndex: _propTypes.default.number,
129
- type: _propTypes.default.oneOfType([_propTypes.default.oneOf(['button', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'reset', 'search', 'submit', 'tel', 'text', 'time', 'url', 'week']), _propTypes.default.object]),
129
+ type: _propTypes.default.string,
130
130
  value: _propTypes.default.string
131
131
  } : void 0;
@@ -31,6 +31,7 @@ const DATA_GRID_PROPS_DEFAULT_VALUES = exports.DATA_GRID_PROPS_DEFAULT_VALUES =
31
31
  disableMultipleColumnsSorting: false,
32
32
  disableMultipleRowSelection: false,
33
33
  disableRowSelectionOnClick: false,
34
+ disableRowSelectionExcludeModel: false,
34
35
  disableVirtualization: false,
35
36
  editMode: _gridEditRowModel.GridEditModes.Cell,
36
37
  filterDebounceMs: 150,
@@ -219,6 +219,11 @@ DataGridRaw.propTypes = {
219
219
  * @default false (`!props.checkboxSelection` for MIT Data Grid)
220
220
  */
221
221
  disableMultipleRowSelection: PropTypes.bool,
222
+ /**
223
+ * If `true`, the Data Grid will not use the exclude model optimization when selecting all rows.
224
+ * @default false
225
+ */
226
+ disableRowSelectionExcludeModel: PropTypes.bool,
222
227
  /**
223
228
  * If `true`, the selection on click on a row or cell is disabled.
224
229
  * @default false
@@ -78,8 +78,8 @@ const GridShadowScrollArea = forwardRef(function GridShadowScrollArea(props, ref
78
78
  const {
79
79
  children
80
80
  } = props,
81
- rest = _objectWithoutPropertiesLoose(props, _excluded);
82
- return /*#__PURE__*/_jsx(ShadowScrollArea, _extends({}, rest, {
81
+ other = _objectWithoutPropertiesLoose(props, _excluded);
82
+ return /*#__PURE__*/_jsx(ShadowScrollArea, _extends({}, other, {
83
83
  ref: ref,
84
84
  children: children
85
85
  }));
@@ -62,7 +62,7 @@ export const GridSkeletonLoadingOverlayInner = forwardRef(function GridSkeletonL
62
62
  visibleColumns,
63
63
  showFirstRowBorder
64
64
  } = props,
65
- rest = _objectWithoutPropertiesLoose(props, _excluded);
65
+ other = _objectWithoutPropertiesLoose(props, _excluded);
66
66
  const allVisibleColumns = useGridSelector(apiRef, gridVisibleColumnDefinitionsSelector);
67
67
  const columns = React.useMemo(() => allVisibleColumns.slice(0, inViewportCount), [allVisibleColumns, inViewportCount]);
68
68
  const pinnedColumns = useGridSelector(apiRef, gridVisiblePinnedColumnDefinitionsSelector);
@@ -181,7 +181,7 @@ export const GridSkeletonLoadingOverlayInner = forwardRef(function GridSkeletonL
181
181
  useGridEvent(apiRef, 'columnResize', handleColumnResize);
182
182
  return /*#__PURE__*/_jsx(SkeletonOverlay, _extends({
183
183
  className: classes.root
184
- }, rest, {
184
+ }, other, {
185
185
  ref: handleRef,
186
186
  children: children
187
187
  }));
@@ -100,7 +100,7 @@ const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
100
100
  return size;
101
101
  }, [filteredSelection, selectionCandidates]);
102
102
  const isIndeterminate = React.useMemo(() => {
103
- if (filteredSelection.ids.size === 0) {
103
+ if (currentSelectionSize === 0) {
104
104
  return false;
105
105
  }
106
106
  const selectionManager = createRowSelectionManager(filteredSelection);
@@ -110,7 +110,7 @@ const GridHeaderCheckbox = forwardRef(function GridHeaderCheckbox(props, ref) {
110
110
  }
111
111
  }
112
112
  return false;
113
- }, [filteredSelection, selectionCandidates]);
113
+ }, [currentSelectionSize, filteredSelection, selectionCandidates]);
114
114
  const isChecked = currentSelectionSize > 0;
115
115
  const handleChange = event => {
116
116
  const params = {
@@ -313,5 +313,5 @@ const GridColumnsManagementEmptyText = styled('div', {
313
313
  const GridColumnsManagementRow = styled(NotRendered, {
314
314
  name: 'MuiDataGrid',
315
315
  slot: 'ColumnsManagementRow'
316
- })();
316
+ })({});
317
317
  export { GridColumnsManagement };
@@ -20,7 +20,7 @@ function GridFilterInputBoolean(props) {
20
20
  tabIndex,
21
21
  slotProps
22
22
  } = props,
23
- others = _objectWithoutPropertiesLoose(props, _excluded);
23
+ other = _objectWithoutPropertiesLoose(props, _excluded);
24
24
  const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
25
25
  const rootProps = useGridRootProps();
26
26
  const labelId = useId();
@@ -55,7 +55,7 @@ function GridFilterInputBoolean(props) {
55
55
  tabIndex
56
56
  }, rootSlotProps?.htmlInput)
57
57
  }
58
- }, baseSelectProps, others, slotProps?.root, {
58
+ }, baseSelectProps, other, slotProps?.root, {
59
59
  children: [/*#__PURE__*/_jsx(rootProps.slots.baseSelectOption, _extends({}, baseSelectOptionProps, {
60
60
  native: isSelectNative,
61
61
  value: "",
@@ -42,7 +42,7 @@ function GridFilterInputSingleSelect(props) {
42
42
  headerFilterMenu,
43
43
  slotProps
44
44
  } = props,
45
- others = _objectWithoutPropertiesLoose(props, _excluded);
45
+ other = _objectWithoutPropertiesLoose(props, _excluded);
46
46
  const filterValue = item.value ?? '';
47
47
  const id = useId();
48
48
  const labelId = useId();
@@ -84,7 +84,7 @@ function GridFilterInputSingleSelect(props) {
84
84
  }, slotProps?.root.slotProps?.htmlInput)
85
85
  },
86
86
  native: isSelectNative
87
- }, rootProps.slotProps?.baseSelect, others, slotProps?.root, {
87
+ }, rootProps.slotProps?.baseSelect, other, slotProps?.root, {
88
88
  children: renderSingleSelectOptions({
89
89
  column: resolvedColumn,
90
90
  OptionComponent: rootProps.slots.baseSelectOption,
@@ -22,7 +22,7 @@ function GridFilterInputValue(props) {
22
22
  clearButton,
23
23
  headerFilterMenu
24
24
  } = props,
25
- others = _objectWithoutPropertiesLoose(props, _excluded);
25
+ other = _objectWithoutPropertiesLoose(props, _excluded);
26
26
  const textFieldProps = slotProps?.root;
27
27
  const filterTimeout = useTimeout();
28
28
  const [filterValueState, setFilterValueState] = React.useState(sanitizeFilterItemValue(item.value));
@@ -69,7 +69,7 @@ function GridFilterInputValue(props) {
69
69
  }, textFieldProps?.slotProps?.htmlInput)
70
70
  }),
71
71
  inputRef: focusElementRef
72
- }, rootProps.slotProps?.baseTextField, others, textFieldProps)), headerFilterMenu, clearButton]
72
+ }, rootProps.slotProps?.baseTextField, other, textFieldProps)), headerFilterMenu, clearButton]
73
73
  });
74
74
  }
75
75
  function sanitizeFilterItemValue(value) {
@@ -118,7 +118,7 @@ process.env.NODE_ENV !== "production" ? QuickFilterControl.propTypes = {
118
118
  slotProps: PropTypes.object,
119
119
  style: PropTypes.object,
120
120
  tabIndex: PropTypes.number,
121
- type: PropTypes.oneOfType([PropTypes.oneOf(['button', 'checkbox', 'color', 'date', 'datetime-local', 'email', 'file', 'hidden', 'image', 'month', 'number', 'password', 'radio', 'range', 'reset', 'search', 'submit', 'tel', 'text', 'time', 'url', 'week']), PropTypes.object]),
121
+ type: PropTypes.string,
122
122
  value: PropTypes.string
123
123
  } : void 0;
124
124
  export { QuickFilterControl };
@@ -25,6 +25,7 @@ export const DATA_GRID_PROPS_DEFAULT_VALUES = {
25
25
  disableMultipleColumnsSorting: false,
26
26
  disableMultipleRowSelection: false,
27
27
  disableRowSelectionOnClick: false,
28
+ disableRowSelectionExcludeModel: false,
28
29
  disableVirtualization: false,
29
30
  editMode: GridEditModes.Cell,
30
31
  filterDebounceMs: 150,
@@ -9,4 +9,4 @@ export declare const rowSelectionStateInitializer: GridStateInitializer<Pick<Dat
9
9
  * @requires useGridFocus (state) - can be after
10
10
  * @requires useGridKeyboardNavigation (`cellKeyDown` event must first be consumed by it)
11
11
  */
12
- export declare const useGridRowSelection: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "checkboxSelection" | "rowSelectionModel" | "onRowSelectionModelChange" | "disableMultipleRowSelection" | "disableRowSelectionOnClick" | "isRowSelectable" | "checkboxSelectionVisibleOnly" | "pagination" | "paginationMode" | "filterMode" | "classes" | "keepNonExistentRowsSelected" | "rowSelection" | "rowSelectionPropagation" | "signature">) => void;
12
+ export declare const useGridRowSelection: (apiRef: RefObject<GridPrivateApiCommunity>, props: Pick<DataGridProcessedProps, "checkboxSelection" | "rowSelectionModel" | "onRowSelectionModelChange" | "disableMultipleRowSelection" | "disableRowSelectionOnClick" | "disableRowSelectionExcludeModel" | "isRowSelectable" | "checkboxSelectionVisibleOnly" | "pagination" | "paginationMode" | "filterMode" | "classes" | "keepNonExistentRowsSelected" | "rowSelection" | "rowSelectionPropagation" | "signature">) => void;
@@ -431,7 +431,7 @@ export const useGridRowSelection = (apiRef, props) => {
431
431
  const filterModel = gridFilterModelSelector(apiRef);
432
432
  const quickFilterModel = gridQuickFilterValuesSelector(apiRef);
433
433
  const hasFilters = filterModel.items.length > 0 || quickFilterModel?.some(val => val.length);
434
- if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && (!isNestedData || props.rowSelectionPropagation?.descendants) && !hasFilters) {
434
+ if (!props.isRowSelectable && !props.checkboxSelectionVisibleOnly && (!isNestedData || props.rowSelectionPropagation?.descendants) && !hasFilters && !props.disableRowSelectionExcludeModel) {
435
435
  apiRef.current.setRowSelectionModel({
436
436
  type: value ? 'exclude' : 'include',
437
437
  ids: new Set()
@@ -439,7 +439,7 @@ export const useGridRowSelection = (apiRef, props) => {
439
439
  } else {
440
440
  apiRef.current.selectRows(getRowsToBeSelected(), value);
441
441
  }
442
- }, [apiRef, getRowsToBeSelected, props.checkboxSelectionVisibleOnly, props.isRowSelectable, props.rowSelectionPropagation?.descendants, isNestedData]);
442
+ }, [apiRef, getRowsToBeSelected, props.checkboxSelectionVisibleOnly, props.isRowSelectable, props.rowSelectionPropagation?.descendants, props.disableRowSelectionExcludeModel, isNestedData]);
443
443
  const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
444
444
  toggleAllRows(params.value);
445
445
  }, [toggleAllRows]);
@@ -13,12 +13,18 @@ export declare const gridTopLevelRowCountSelector: (args_0: import("react").RefO
13
13
  export declare const gridRowsLookupSelector: (args_0: import("react").RefObject<{
14
14
  state: GridStateCommunity;
15
15
  } | null>) => import("@mui/x-data-grid").GridRowIdToModelLookup<import("@mui/x-data-grid").GridValidRowModel>;
16
+ /**
17
+ * @category Rows
18
+ */
16
19
  export declare const gridRowSelector: (args_0: import("react").RefObject<{
17
20
  state: GridStateCommunity;
18
21
  } | null>, id: GridRowId) => import("@mui/x-data-grid").GridValidRowModel;
19
22
  export declare const gridRowTreeSelector: (args_0: import("react").RefObject<{
20
23
  state: GridStateCommunity;
21
24
  } | null>) => import("@mui/x-data-grid").GridRowTreeConfig;
25
+ /**
26
+ * @category Rows
27
+ */
22
28
  export declare const gridRowNodeSelector: (args_0: import("react").RefObject<{
23
29
  state: GridStateCommunity;
24
30
  } | null>, rowId: GridRowId) => import("@mui/x-data-grid").GridTreeNode;
@@ -6,8 +6,16 @@ export const gridTopLevelRowCountSelector = createSelector(gridRowsStateSelector
6
6
 
7
7
  // TODO rows v6: Rename
8
8
  export const gridRowsLookupSelector = createSelector(gridRowsStateSelector, rows => rows.dataRowIdToModelLookup);
9
+
10
+ /**
11
+ * @category Rows
12
+ */
9
13
  export const gridRowSelector = createSelector(gridRowsLookupSelector, (rows, id) => rows[id]);
10
14
  export const gridRowTreeSelector = createSelector(gridRowsStateSelector, rows => rows.tree);
15
+
16
+ /**
17
+ * @category Rows
18
+ */
11
19
  export const gridRowNodeSelector = createSelector(gridRowTreeSelector, (rowTree, rowId) => rowTree[rowId]);
12
20
  export const gridRowGroupsToFetchSelector = createSelector(gridRowsStateSelector, rows => rows.groupsToFetch);
13
21
  export const gridRowGroupingNameSelector = createSelector(gridRowsStateSelector, rows => rows.groupingName);
@@ -1,5 +1,5 @@
1
1
  export * from "./gridRowsMetaSelector.js";
2
2
  export * from "./gridRowsMetaState.js";
3
- export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector } from "./gridRowsSelector.js";
3
+ export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector, gridRowSelector } from "./gridRowsSelector.js";
4
4
  export type { GridRowsState, GridRowIdToModelLookup } from "./gridRowsInterfaces.js";
5
5
  export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from "./gridRowsUtils.js";
@@ -1,4 +1,4 @@
1
1
  export * from "./gridRowsMetaSelector.js";
2
2
  export * from "./gridRowsMetaState.js";
3
- export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector } from "./gridRowsSelector.js";
3
+ export { gridRowCountSelector, gridRowsLoadingSelector, gridTopLevelRowCountSelector, gridRowsLookupSelector, gridRowTreeSelector, gridRowGroupingNameSelector, gridRowTreeDepthsSelector, gridRowMaximumTreeDepthSelector, gridDataRowIdsSelector, gridRowNodeSelector, gridRowSelector } from "./gridRowsSelector.js";
4
4
  export { GRID_ROOT_GROUP_ID, checkGridRowIdIsValid, isAutogeneratedRow } from "./gridRowsUtils.js";
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid v8.11.1
2
+ * @mui/x-data-grid v8.11.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the