@mui/x-data-grid-pro 7.23.3 → 7.23.5

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,68 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## 7.23.5
7
+
8
+ _Dec 27, 2024_
9
+
10
+ Here are some highlights ✨:
11
+
12
+ - 🐞 Fix version mismatch issue in Data Grid codesandbox/stackblitz demos
13
+
14
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
15
+
16
+ ### Data Grid
17
+
18
+ #### `@mui/x-data-grid@7.23.5`
19
+
20
+ No changes since `@mui/x-data-grid@v7.23.4`.
21
+
22
+ #### `@mui/x-data-grid-pro@7.23.5` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
23
+
24
+ Same changes as in `@mui/x-data-grid@7.23.5`.
25
+
26
+ #### `@mui/x-data-grid-premium@7.23.5` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
27
+
28
+ Same changes as in `@mui/x-data-grid-pro@7.23.5`.
29
+
30
+ ## v7.23.4
31
+
32
+ _Dec 27, 2024_
33
+
34
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
35
+
36
+ - 🌍 Improve Dutch (nl-NL) locale on the Data Grid
37
+ - 🐞 Bugfixes
38
+
39
+ Special thanks go out to the community contributor who has helped make this release possible:
40
+ @JoepVerkoelen.
41
+ Following are all team members who have contributed to this release:
42
+ @arminmeh, @oliviertassinari.
43
+
44
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
45
+
46
+ ### Data Grid
47
+
48
+ #### `@mui/x-data-grid@7.23.4`
49
+
50
+ - [DataGrid] Fix header filters showing clear button while empty (#15990) @k-rajat19
51
+ - [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15984) @lauri865
52
+ - [l10n] Improve Dutch (nl-NL) locale (#15920) @JoepVerkoelen
53
+
54
+ #### `@mui/x-data-grid-pro@7.23.4` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
55
+
56
+ Same changes as in `@mui/x-data-grid@7.23.4`.
57
+
58
+ #### `@mui/x-data-grid-premium@7.23.4` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
59
+
60
+ Same changes as in `@mui/x-data-grid-pro@7.23.4`, plus:
61
+
62
+ - [DataGridPremium] Fix column pinning with checkbox selection and row grouping (#15949) @k-rajat19
63
+
64
+ ### Docs
65
+
66
+ - [docs] Fix outdated link to handbook (#15855) @oliviertassinari
67
+
6
68
  ## 7.23.3
7
69
 
8
70
  _Dec 19, 2024_
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _xLicense = require("@mui/x-license");
14
14
  var _xDataGrid = require("@mui/x-data-grid");
15
15
  var _internals = require("@mui/x-data-grid/internals");
16
+ var _forwardRef = require("@mui/x-internals/forwardRef");
16
17
  var _useDataGridProComponent = require("./useDataGridProComponent");
17
18
  var _useDataGridProProps = require("./useDataGridProProps");
18
19
  var _releaseInfo = require("../utils/releaseInfo");
@@ -27,7 +28,7 @@ const configuration = {
27
28
  }
28
29
  };
29
30
  const releaseInfo = (0, _releaseInfo.getReleaseInfo)();
30
- const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProps, ref) {
31
+ const DataGridProRaw = (0, _forwardRef.forwardRef)(function DataGridPro(inProps, ref) {
31
32
  const props = (0, _useDataGridProProps.useDataGridProProps)(inProps);
32
33
  const privateApiRef = (0, _useDataGridProComponent.useDataGridProComponent)(props.apiRef, props);
33
34
  (0, _xLicense.useLicenseVerifier)('x-data-grid-pro', releaseInfo);
@@ -41,9 +42,9 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
41
42
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGrid.GridRoot, (0, _extends2.default)({
42
43
  className: props.className,
43
44
  style: props.style,
44
- sx: props.sx,
45
- ref: ref
45
+ sx: props.sx
46
46
  }, props.forwardedProps, props.slotProps?.root, {
47
+ ref: ref,
47
48
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridBody, {
48
49
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
49
50
  packageName: "x-data-grid-pro",
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MUI X Data Grid Pro
2
2
 
3
3
  This package is the Pro plan edition of the Data Grid component.
4
- It's part of [MUI X](https://mui.com/x/), an open-core extension of MUI Core, with advanced components.
4
+ It's part of [MUI X](https://mui.com/x/), an open-core extension of our Core libraries, with advanced components.
5
5
 
6
6
  ## Installation
7
7
 
@@ -2,5 +2,5 @@ import * as React from 'react';
2
2
  import { UseGridColumnHeadersProps } from '@mui/x-data-grid/internals';
3
3
  export interface GridColumnHeadersProps extends React.HTMLAttributes<HTMLDivElement>, UseGridColumnHeadersProps {
4
4
  }
5
- declare const GridColumnHeaders: React.ForwardRefExoticComponent<GridColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
5
+ declare const GridColumnHeaders: React.ForwardRefExoticComponent<GridColumnHeadersProps> | React.ForwardRefExoticComponent<GridColumnHeadersProps & React.RefAttributes<HTMLDivElement>>;
6
6
  export { GridColumnHeaders };
@@ -12,6 +12,7 @@ var React = _interopRequireWildcard(require("react"));
12
12
  var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _styles = require("@mui/material/styles");
14
14
  var _internals = require("@mui/x-data-grid/internals");
15
+ var _forwardRef = require("@mui/x-internals/forwardRef");
15
16
  var _useGridColumnHeaders = require("../hooks/features/columnHeaders/useGridColumnHeaders");
16
17
  var _jsxRuntime = require("react/jsx-runtime");
17
18
  const _excluded = ["style", "className", "visibleColumns", "sortColumnLookup", "filterColumnLookup", "columnHeaderTabIndexState", "columnGroupHeaderTabIndexState", "columnHeaderFocus", "columnGroupHeaderFocus", "headerGroupingMaxDepth", "columnMenuState", "columnVisibility", "columnGroupsHeaderStructure", "hasOtherElementInTabSequence"];
@@ -19,7 +20,7 @@ const Filler = (0, _styles.styled)('div')({
19
20
  flex: 1,
20
21
  backgroundColor: 'var(--DataGrid-containerBackground)'
21
22
  });
22
- const GridColumnHeaders = exports.GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
23
+ const GridColumnHeaders = exports.GridColumnHeaders = (0, _forwardRef.forwardRef)(function GridColumnHeaders(props, ref) {
23
24
  const {
24
25
  className,
25
26
  visibleColumns,
@@ -56,9 +57,9 @@ const GridColumnHeaders = exports.GridColumnHeaders = /*#__PURE__*/React.forward
56
57
  columnGroupsHeaderStructure
57
58
  });
58
59
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.GridBaseColumnHeaders, (0, _extends2.default)({
59
- ref: ref,
60
60
  className: className
61
61
  }, other, getInnerProps(), {
62
+ ref: ref,
62
63
  children: [getColumnGroupHeadersRows(), getColumnHeadersRow(), getColumnFiltersRow(), /*#__PURE__*/(0, _jsxRuntime.jsx)(Filler, {})]
63
64
  }));
64
65
  });
@@ -21,4 +21,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PRO: {
21
21
  displayOrder: number;
22
22
  };
23
23
  };
24
- export declare const GridProColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
24
+ export declare const GridProColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps> | React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
@@ -9,6 +9,7 @@ exports.GridProColumnMenu = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GR
9
9
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _xDataGrid = require("@mui/x-data-grid");
12
+ var _forwardRef = require("@mui/x-internals/forwardRef");
12
13
  var _GridColumnMenuPinningItem = require("./GridColumnMenuPinningItem");
13
14
  var _jsxRuntime = require("react/jsx-runtime");
14
15
  const GRID_COLUMN_MENU_SLOTS_PRO = exports.GRID_COLUMN_MENU_SLOTS_PRO = (0, _extends2.default)({}, _xDataGrid.GRID_COLUMN_MENU_SLOTS, {
@@ -19,11 +20,10 @@ const GRID_COLUMN_MENU_SLOT_PROPS_PRO = exports.GRID_COLUMN_MENU_SLOT_PROPS_PRO
19
20
  displayOrder: 15
20
21
  }
21
22
  });
22
- const GridProColumnMenu = exports.GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
23
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridGenericColumnMenu, (0, _extends2.default)({
24
- ref: ref
25
- }, props, {
23
+ const GridProColumnMenu = exports.GridProColumnMenu = (0, _forwardRef.forwardRef)(function GridProColumnMenu(props, ref) {
24
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGrid.GridGenericColumnMenu, (0, _extends2.default)({}, props, {
26
25
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
27
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
26
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO,
27
+ ref: ref
28
28
  }));
29
29
  });
@@ -22,5 +22,5 @@ export interface GridHeaderFilterCellProps extends Pick<GridStateColDef, 'header
22
22
  sectionLength: number;
23
23
  gridHasFiller: boolean;
24
24
  }
25
- declare const Memoized: React.ForwardRefExoticComponent<GridHeaderFilterCellProps & React.RefAttributes<HTMLDivElement>>;
25
+ declare const Memoized: React.ForwardRefExoticComponent<GridHeaderFilterCellProps> | React.ForwardRefExoticComponent<GridHeaderFilterCellProps & React.RefAttributes<HTMLDivElement>>;
26
26
  export { Memoized as GridHeaderFilterCell };
@@ -15,6 +15,7 @@ var _utils = require("@mui/utils");
15
15
  var _fastMemo = require("@mui/x-internals/fastMemo");
16
16
  var _xDataGrid = require("@mui/x-data-grid");
17
17
  var _internals = require("@mui/x-data-grid/internals");
18
+ var _forwardRef = require("@mui/x-internals/forwardRef");
18
19
  var _useGridRootProps = require("../../hooks/utils/useGridRootProps");
19
20
  var _GridHeaderFilterMenuContainer = require("./GridHeaderFilterMenuContainer");
20
21
  var _GridHeaderFilterClearButton = require("./GridHeaderFilterClearButton");
@@ -48,7 +49,7 @@ const defaultInputComponents = {
48
49
  actions: null,
49
50
  custom: null
50
51
  };
51
- const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
52
+ const GridHeaderFilterCell = (0, _forwardRef.forwardRef)((props, ref) => {
52
53
  const {
53
54
  colIndex,
54
55
  height,
@@ -97,13 +98,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
97
98
  }, [colDef.field, filterModel, filterableColumnsLookup]);
98
99
  const currentOperator = React.useMemo(() => filterOperators.find(operator => operator.value === item.operator) ?? filterOperators[0], [item.operator, filterOperators]);
99
100
  const InputComponent = colDef.filterable || isFilterReadOnly ? currentOperator.InputComponent ?? defaultInputComponents[colDef.type] : null;
100
- const applyFilterChanges = React.useCallback(updatedItem => {
101
- if (item.value && updatedItem.value === undefined) {
102
- apiRef.current.deleteFilterItem(updatedItem);
103
- return;
104
- }
105
- apiRef.current.upsertFilterItem(updatedItem);
106
- }, [apiRef, item]);
107
101
  const clearFilterItem = React.useCallback(() => {
108
102
  apiRef.current.deleteFilterItem(item);
109
103
  }, [apiRef, item]);
@@ -204,7 +198,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
204
198
  const isFilterActive = isApplied || hasFocus;
205
199
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", (0, _extends2.default)({
206
200
  className: (0, _clsx.default)(classes.root, headerClassName),
207
- ref: handleRef,
208
201
  style: (0, _extends2.default)({
209
202
  height,
210
203
  width
@@ -213,12 +206,13 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
213
206
  "aria-colindex": colIndex + 1,
214
207
  "aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
215
208
  }, other, mouseEventsHandlers, {
209
+ ref: handleRef,
216
210
  children: [headerFilterComponent, InputComponent && headerFilterComponent === undefined ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(React.Fragment, {
217
211
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(InputComponent, (0, _extends2.default)({
218
212
  apiRef: apiRef,
219
213
  item: item,
220
214
  inputRef: inputRef,
221
- applyValue: applyFilterChanges,
215
+ applyValue: apiRef.current.upsertFilterItem,
222
216
  onFocus: () => apiRef.current.startHeaderFilterEditMode(colDef.field),
223
217
  onBlur: event => {
224
218
  apiRef.current.stopHeaderFilterEditMode();
@@ -252,7 +246,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
252
246
  item: item,
253
247
  field: colDef.field,
254
248
  disabled: isFilterReadOnly,
255
- applyFilterChanges: applyFilterChanges,
249
+ applyFilterChanges: apiRef.current.upsertFilterItem,
256
250
  headerFilterMenuRef: headerFilterMenuRef,
257
251
  buttonRef: buttonRef
258
252
  })]
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
7
7
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider } from '@mui/x-data-grid';
8
8
  import { validateProps } from '@mui/x-data-grid/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridProComponent } from "./useDataGridProComponent.js";
10
11
  import { useDataGridProProps } from "./useDataGridProProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
@@ -20,7 +21,7 @@ const configuration = {
20
21
  }
21
22
  };
22
23
  const releaseInfo = getReleaseInfo();
23
- const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProps, ref) {
24
+ const DataGridProRaw = forwardRef(function DataGridPro(inProps, ref) {
24
25
  const props = useDataGridProProps(inProps);
25
26
  const privateApiRef = useDataGridProComponent(props.apiRef, props);
26
27
  useLicenseVerifier('x-data-grid-pro', releaseInfo);
@@ -34,9 +35,9 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
34
35
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
35
36
  className: props.className,
36
37
  style: props.style,
37
- sx: props.sx,
38
- ref: ref
38
+ sx: props.sx
39
39
  }, props.forwardedProps, props.slotProps?.root, {
40
+ ref: ref,
40
41
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
41
42
  children: /*#__PURE__*/_jsx(Watermark, {
42
43
  packageName: "x-data-grid-pro",
@@ -5,13 +5,14 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { styled } from '@mui/material/styles';
7
7
  import { GridBaseColumnHeaders } from '@mui/x-data-grid/internals';
8
+ import { forwardRef } from '@mui/x-internals/forwardRef';
8
9
  import { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const Filler = styled('div')({
11
12
  flex: 1,
12
13
  backgroundColor: 'var(--DataGrid-containerBackground)'
13
14
  });
14
- const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
15
+ const GridColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
15
16
  const {
16
17
  className,
17
18
  visibleColumns,
@@ -48,9 +49,9 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
48
49
  columnGroupsHeaderStructure
49
50
  });
50
51
  return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({
51
- ref: ref,
52
52
  className: className
53
53
  }, other, getInnerProps(), {
54
+ ref: ref,
54
55
  children: [getColumnGroupHeadersRows(), getColumnHeadersRow(), getColumnFiltersRow(), /*#__PURE__*/_jsx(Filler, {})]
55
56
  }));
56
57
  });
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.js";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
@@ -11,11 +12,10 @@ export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLO
11
12
  displayOrder: 15
12
13
  }
13
14
  });
14
- export const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
15
- return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
16
- ref: ref
17
- }, props, {
15
+ export const GridProColumnMenu = forwardRef(function GridProColumnMenu(props, ref) {
16
+ return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
18
17
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
19
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
18
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO,
19
+ ref: ref
20
20
  }));
21
21
  });
@@ -8,6 +8,7 @@ import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeCl
8
8
  import { fastMemo } from '@mui/x-internals/fastMemo';
9
9
  import { gridVisibleColumnFieldsSelector, getDataGridUtilityClass, useGridSelector, GridFilterInputValue, GridFilterInputDate, GridFilterInputBoolean, GridFilterInputSingleSelect, gridFilterModelSelector, gridFilterableColumnLookupSelector } from '@mui/x-data-grid';
10
10
  import { useGridPrivateApiContext, gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector, isNavigationKey, shouldCellShowLeftBorder, shouldCellShowRightBorder } from '@mui/x-data-grid/internals';
11
+ import { forwardRef } from '@mui/x-internals/forwardRef';
11
12
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
12
13
  import { GridHeaderFilterMenuContainer } from "./GridHeaderFilterMenuContainer.js";
13
14
  import { GridHeaderFilterClearButton } from "./GridHeaderFilterClearButton.js";
@@ -40,7 +41,7 @@ const defaultInputComponents = {
40
41
  actions: null,
41
42
  custom: null
42
43
  };
43
- const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
44
+ const GridHeaderFilterCell = forwardRef((props, ref) => {
44
45
  const {
45
46
  colIndex,
46
47
  height,
@@ -89,13 +90,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
89
90
  }, [colDef.field, filterModel, filterableColumnsLookup]);
90
91
  const currentOperator = React.useMemo(() => filterOperators.find(operator => operator.value === item.operator) ?? filterOperators[0], [item.operator, filterOperators]);
91
92
  const InputComponent = colDef.filterable || isFilterReadOnly ? currentOperator.InputComponent ?? defaultInputComponents[colDef.type] : null;
92
- const applyFilterChanges = React.useCallback(updatedItem => {
93
- if (item.value && updatedItem.value === undefined) {
94
- apiRef.current.deleteFilterItem(updatedItem);
95
- return;
96
- }
97
- apiRef.current.upsertFilterItem(updatedItem);
98
- }, [apiRef, item]);
99
93
  const clearFilterItem = React.useCallback(() => {
100
94
  apiRef.current.deleteFilterItem(item);
101
95
  }, [apiRef, item]);
@@ -196,7 +190,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
196
190
  const isFilterActive = isApplied || hasFocus;
197
191
  return /*#__PURE__*/_jsxs("div", _extends({
198
192
  className: clsx(classes.root, headerClassName),
199
- ref: handleRef,
200
193
  style: _extends({
201
194
  height,
202
195
  width
@@ -205,12 +198,13 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
205
198
  "aria-colindex": colIndex + 1,
206
199
  "aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
207
200
  }, other, mouseEventsHandlers, {
201
+ ref: handleRef,
208
202
  children: [headerFilterComponent, InputComponent && headerFilterComponent === undefined ? /*#__PURE__*/_jsxs(React.Fragment, {
209
203
  children: [/*#__PURE__*/_jsx(InputComponent, _extends({
210
204
  apiRef: apiRef,
211
205
  item: item,
212
206
  inputRef: inputRef,
213
- applyValue: applyFilterChanges,
207
+ applyValue: apiRef.current.upsertFilterItem,
214
208
  onFocus: () => apiRef.current.startHeaderFilterEditMode(colDef.field),
215
209
  onBlur: event => {
216
210
  apiRef.current.stopHeaderFilterEditMode();
@@ -244,7 +238,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
244
238
  item: item,
245
239
  field: colDef.field,
246
240
  disabled: isFilterReadOnly,
247
- applyFilterChanges: applyFilterChanges,
241
+ applyFilterChanges: apiRef.current.upsertFilterItem,
248
242
  headerFilterMenuRef: headerFilterMenuRef,
249
243
  buttonRef: buttonRef
250
244
  })]
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNDU2NjQwMDAwMA==";
3
+ const releaseInfo = "MTczNTIzOTYwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.23.3
2
+ * @mui/x-data-grid-pro v7.23.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -6,6 +6,7 @@ import PropTypes from 'prop-types';
6
6
  import { useLicenseVerifier, Watermark } from '@mui/x-license';
7
7
  import { GridBody, GridFooterPlaceholder, GridHeader, GridRoot, GridContextProvider } from '@mui/x-data-grid';
8
8
  import { validateProps } from '@mui/x-data-grid/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridProComponent } from "./useDataGridProComponent.js";
10
11
  import { useDataGridProProps } from "./useDataGridProProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
@@ -20,7 +21,7 @@ const configuration = {
20
21
  }
21
22
  };
22
23
  const releaseInfo = getReleaseInfo();
23
- const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProps, ref) {
24
+ const DataGridProRaw = forwardRef(function DataGridPro(inProps, ref) {
24
25
  const props = useDataGridProProps(inProps);
25
26
  const privateApiRef = useDataGridProComponent(props.apiRef, props);
26
27
  useLicenseVerifier('x-data-grid-pro', releaseInfo);
@@ -34,9 +35,9 @@ const DataGridProRaw = /*#__PURE__*/React.forwardRef(function DataGridPro(inProp
34
35
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
35
36
  className: props.className,
36
37
  style: props.style,
37
- sx: props.sx,
38
- ref: ref
38
+ sx: props.sx
39
39
  }, props.forwardedProps, props.slotProps?.root, {
40
+ ref: ref,
40
41
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
41
42
  children: /*#__PURE__*/_jsx(Watermark, {
42
43
  packageName: "x-data-grid-pro",
@@ -5,13 +5,14 @@ import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
6
  import { styled } from '@mui/material/styles';
7
7
  import { GridBaseColumnHeaders } from '@mui/x-data-grid/internals';
8
+ import { forwardRef } from '@mui/x-internals/forwardRef';
8
9
  import { useGridColumnHeaders } from "../hooks/features/columnHeaders/useGridColumnHeaders.js";
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const Filler = styled('div')({
11
12
  flex: 1,
12
13
  backgroundColor: 'var(--DataGrid-containerBackground)'
13
14
  });
14
- const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeaders(props, ref) {
15
+ const GridColumnHeaders = forwardRef(function GridColumnHeaders(props, ref) {
15
16
  const {
16
17
  className,
17
18
  visibleColumns,
@@ -48,9 +49,9 @@ const GridColumnHeaders = /*#__PURE__*/React.forwardRef(function GridColumnHeade
48
49
  columnGroupsHeaderStructure
49
50
  });
50
51
  return /*#__PURE__*/_jsxs(GridBaseColumnHeaders, _extends({
51
- ref: ref,
52
52
  className: className
53
53
  }, other, getInnerProps(), {
54
+ ref: ref,
54
55
  children: [getColumnGroupHeadersRows(), getColumnHeadersRow(), getColumnFiltersRow(), /*#__PURE__*/_jsx(Filler, {})]
55
56
  }));
56
57
  });
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import * as React from 'react';
3
3
  import { GridGenericColumnMenu, GRID_COLUMN_MENU_SLOTS, GRID_COLUMN_MENU_SLOT_PROPS } from '@mui/x-data-grid';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { GridColumnMenuPinningItem } from "./GridColumnMenuPinningItem.js";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  export const GRID_COLUMN_MENU_SLOTS_PRO = _extends({}, GRID_COLUMN_MENU_SLOTS, {
@@ -11,11 +12,10 @@ export const GRID_COLUMN_MENU_SLOT_PROPS_PRO = _extends({}, GRID_COLUMN_MENU_SLO
11
12
  displayOrder: 15
12
13
  }
13
14
  });
14
- export const GridProColumnMenu = /*#__PURE__*/React.forwardRef(function GridProColumnMenu(props, ref) {
15
- return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
16
- ref: ref
17
- }, props, {
15
+ export const GridProColumnMenu = forwardRef(function GridProColumnMenu(props, ref) {
16
+ return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
18
17
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PRO,
19
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO
18
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PRO,
19
+ ref: ref
20
20
  }));
21
21
  });
@@ -8,6 +8,7 @@ import { unstable_useForkRef as useForkRef, unstable_composeClasses as composeCl
8
8
  import { fastMemo } from '@mui/x-internals/fastMemo';
9
9
  import { gridVisibleColumnFieldsSelector, getDataGridUtilityClass, useGridSelector, GridFilterInputValue, GridFilterInputDate, GridFilterInputBoolean, GridFilterInputSingleSelect, gridFilterModelSelector, gridFilterableColumnLookupSelector } from '@mui/x-data-grid';
10
10
  import { useGridPrivateApiContext, gridHeaderFilteringEditFieldSelector, gridHeaderFilteringMenuSelector, isNavigationKey, shouldCellShowLeftBorder, shouldCellShowRightBorder } from '@mui/x-data-grid/internals';
11
+ import { forwardRef } from '@mui/x-internals/forwardRef';
11
12
  import { useGridRootProps } from "../../hooks/utils/useGridRootProps.js";
12
13
  import { GridHeaderFilterMenuContainer } from "./GridHeaderFilterMenuContainer.js";
13
14
  import { GridHeaderFilterClearButton } from "./GridHeaderFilterClearButton.js";
@@ -40,7 +41,7 @@ const defaultInputComponents = {
40
41
  actions: null,
41
42
  custom: null
42
43
  };
43
- const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
44
+ const GridHeaderFilterCell = forwardRef((props, ref) => {
44
45
  const {
45
46
  colIndex,
46
47
  height,
@@ -89,13 +90,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
89
90
  }, [colDef.field, filterModel, filterableColumnsLookup]);
90
91
  const currentOperator = React.useMemo(() => filterOperators.find(operator => operator.value === item.operator) ?? filterOperators[0], [item.operator, filterOperators]);
91
92
  const InputComponent = colDef.filterable || isFilterReadOnly ? currentOperator.InputComponent ?? defaultInputComponents[colDef.type] : null;
92
- const applyFilterChanges = React.useCallback(updatedItem => {
93
- if (item.value && updatedItem.value === undefined) {
94
- apiRef.current.deleteFilterItem(updatedItem);
95
- return;
96
- }
97
- apiRef.current.upsertFilterItem(updatedItem);
98
- }, [apiRef, item]);
99
93
  const clearFilterItem = React.useCallback(() => {
100
94
  apiRef.current.deleteFilterItem(item);
101
95
  }, [apiRef, item]);
@@ -196,7 +190,6 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
196
190
  const isFilterActive = isApplied || hasFocus;
197
191
  return /*#__PURE__*/_jsxs("div", _extends({
198
192
  className: clsx(classes.root, headerClassName),
199
- ref: handleRef,
200
193
  style: _extends({
201
194
  height,
202
195
  width
@@ -205,12 +198,13 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
205
198
  "aria-colindex": colIndex + 1,
206
199
  "aria-label": headerFilterComponent == null ? colDef.headerName ?? colDef.field : undefined
207
200
  }, other, mouseEventsHandlers, {
201
+ ref: handleRef,
208
202
  children: [headerFilterComponent, InputComponent && headerFilterComponent === undefined ? /*#__PURE__*/_jsxs(React.Fragment, {
209
203
  children: [/*#__PURE__*/_jsx(InputComponent, _extends({
210
204
  apiRef: apiRef,
211
205
  item: item,
212
206
  inputRef: inputRef,
213
- applyValue: applyFilterChanges,
207
+ applyValue: apiRef.current.upsertFilterItem,
214
208
  onFocus: () => apiRef.current.startHeaderFilterEditMode(colDef.field),
215
209
  onBlur: event => {
216
210
  apiRef.current.stopHeaderFilterEditMode();
@@ -244,7 +238,7 @@ const GridHeaderFilterCell = /*#__PURE__*/React.forwardRef((props, ref) => {
244
238
  item: item,
245
239
  field: colDef.field,
246
240
  disabled: isFilterReadOnly,
247
- applyFilterChanges: applyFilterChanges,
241
+ applyFilterChanges: apiRef.current.upsertFilterItem,
248
242
  headerFilterMenuRef: headerFilterMenuRef,
249
243
  buttonRef: buttonRef
250
244
  })]
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-pro v7.23.3
2
+ * @mui/x-data-grid-pro v7.23.5
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczNDU2NjQwMDAwMA==";
3
+ const releaseInfo = "MTczNTIzOTYwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-pro",
3
- "version": "7.23.3",
3
+ "version": "7.23.5",
4
4
  "description": "The Pro plan edition of the Data Grid components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -39,9 +39,9 @@
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
41
  "reselect": "^5.1.1",
42
- "@mui/x-internals": "7.23.0",
43
- "@mui/x-data-grid": "7.23.3",
44
- "@mui/x-license": "7.23.2"
42
+ "@mui/x-internals": "7.23.5",
43
+ "@mui/x-data-grid": "7.23.5",
44
+ "@mui/x-license": "7.23.5"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@emotion/react": "^11.9.0",
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.getReleaseInfo = void 0;
7
7
  var _utils = require("@mui/utils");
8
8
  const getReleaseInfo = () => {
9
- const releaseInfo = "MTczNDU2NjQwMDAwMA==";
9
+ const releaseInfo = "MTczNTIzOTYwMDAwMA==";
10
10
  if (process.env.NODE_ENV !== 'production') {
11
11
  // A simple hack to set the value in the test environment (has no build step).
12
12
  // eslint-disable-next-line no-useless-concat