@mui/x-data-grid-premium 7.23.2 → 7.23.4

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,92 @@
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
+ ## v7.23.4
7
+
8
+ _Dec 27, 2024_
9
+
10
+ We'd like to offer a big thanks to the 4 contributors who made this release possible. Here are some highlights ✨:
11
+
12
+ - 🌍 Improve Dutch (nl-NL) locale on the Data Grid
13
+ - 🐞 Bugfixes
14
+
15
+ Special thanks go out to the community contributor who has helped make this release possible:
16
+ @JoepVerkoelen.
17
+ Following are all team members who have contributed to this release:
18
+ @arminmeh, @oliviertassinari.
19
+
20
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
21
+
22
+ ### Data Grid
23
+
24
+ #### `@mui/x-data-grid@7.23.4`
25
+
26
+ - [DataGrid] Fix header filters showing clear button while empty (#15990) @k-rajat19
27
+ - [DataGrid] Replace `forwardRef` with a shim for forward compatibility (#15984) @lauri865
28
+ - [l10n] Improve Dutch (nl-NL) locale (#15920) @JoepVerkoelen
29
+
30
+ #### `@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')
31
+
32
+ Same changes as in `@mui/x-data-grid@7.23.4`.
33
+
34
+ #### `@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')
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@7.23.4`, plus:
37
+
38
+ - [DataGridPremium] Fix column pinning with checkbox selection and row grouping (#15949) @k-rajat19
39
+
40
+ ### Docs
41
+
42
+ - [docs] Fix outdated link to handbook (#15855) @oliviertassinari
43
+
44
+ ## 7.23.3
45
+
46
+ _Dec 19, 2024_
47
+
48
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
49
+
50
+ - 🌍 Improve Korean (ko-KR) locale on the Data Grid
51
+ - 🐞 Bugfixes
52
+
53
+ Special thanks go out to the community contributors who have helped make this release possible:
54
+ @k-rajat19, @good-jinu.
55
+ Following are all team members who have contributed to this release:
56
+ @KenanYusuf, @MBilalShafi, @arminmeh, @flaviendelangle.
57
+
58
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
59
+
60
+ ### Data Grid
61
+
62
+ #### `@mui/x-data-grid@7.23.3`
63
+
64
+ - [DataGrid] Allow passing custom props to `.main` element (#15919) @MBilalShafi
65
+ - [DataGrid] Consider `columnGroupHeaderHeight` prop in `getTotalHeaderHeight` method (#15927) @k-rajat19
66
+ - [DataGrid] Deprecate `indeterminateCheckboxAction` prop (#15862) @MBilalShafi
67
+ - [DataGrid] Fix `aria-label` value for group checkboxes (#15861) @MBilalShafi
68
+ - [DataGrid] Fix autosizing with virtualized columns (#15929) @k-rajat19
69
+ - [DataGrid] Round dimensions to avoid subpixel rendering error (#15873) @KenanYusuf
70
+ - [DataGrid] Toggle menu on click in `<GridActionsCell />` (#15871) @k-rajat19
71
+ - [DataGrid] Trigger row spanning computation on rows update (#15872) @MBilalShafi
72
+ - [l10n] Improve Korean (ko-KR) locale (#15906) @good-jinu
73
+
74
+ #### `@mui/x-data-grid-pro@7.23.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
75
+
76
+ Same changes as in `@mui/x-data-grid@7.23.3`.
77
+
78
+ #### `@mui/x-data-grid-premium@7.23.3` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
79
+
80
+ Same changes as in `@mui/x-data-grid-pro@7.23.3`.
81
+
82
+ ### Date and Time Pickers
83
+
84
+ #### `@mui/x-date-pickers@7.23.3`
85
+
86
+ - [pickers] Add verification to disable skipped hours in spring forward DST (#15918) @flaviendelangle
87
+
88
+ #### `@mui/x-date-pickers-pro@7.23.3` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
89
+
90
+ Same changes as in `@mui/x-date-pickers@7.23.3`.
91
+
6
92
  ## 7.23.2
7
93
 
8
94
  _Dec 12, 2024_
@@ -13,6 +13,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
13
13
  var _xLicense = require("@mui/x-license");
14
14
  var _xDataGridPro = require("@mui/x-data-grid-pro");
15
15
  var _internals = require("@mui/x-data-grid-pro/internals");
16
+ var _forwardRef = require("@mui/x-internals/forwardRef");
16
17
  var _useDataGridPremiumComponent = require("./useDataGridPremiumComponent");
17
18
  var _useDataGridPremiumProps = require("./useDataGridPremiumProps");
18
19
  var _releaseInfo = require("../utils/releaseInfo");
@@ -30,7 +31,7 @@ let dataGridPremiumPropValidators;
30
31
  if (process.env.NODE_ENV !== 'production') {
31
32
  dataGridPremiumPropValidators = [..._internals.propValidatorsDataGrid, ..._internals.propValidatorsDataGridPro];
32
33
  }
33
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
34
+ const DataGridPremiumRaw = (0, _forwardRef.forwardRef)(function DataGridPremium(inProps, ref) {
34
35
  const props = (0, _useDataGridPremiumProps.useDataGridPremiumProps)(inProps);
35
36
  const privateApiRef = (0, _useDataGridPremiumComponent.useDataGridPremiumComponent)(props.apiRef, props);
36
37
  (0, _xLicense.useLicenseVerifier)('x-data-grid-premium', releaseInfo);
@@ -44,9 +45,9 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
44
45
  children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_xDataGridPro.GridRoot, (0, _extends2.default)({
45
46
  className: props.className,
46
47
  style: props.style,
47
- sx: props.sx,
48
- ref: ref
49
- }, props.forwardedProps, {
48
+ sx: props.sx
49
+ }, props.forwardedProps, props.slotProps?.root, {
50
+ ref: ref,
50
51
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridHeader, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridBody, {
51
52
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
52
53
  packageName: "x-data-grid-premium",
@@ -116,6 +117,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
116
117
  */
117
118
  autosizeOptions: _propTypes.default.shape({
118
119
  columns: _propTypes.default.arrayOf(_propTypes.default.string),
120
+ disableColumnVirtualization: _propTypes.default.bool,
119
121
  expand: _propTypes.default.bool,
120
122
  includeHeaders: _propTypes.default.bool,
121
123
  includeOutliers: _propTypes.default.bool,
@@ -465,6 +467,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
465
467
  * If `deselect`, it will deselect all the rows under it.
466
468
  * Works only if `checkboxSelection` is enabled.
467
469
  * @default "deselect"
470
+ * @deprecated `select` will be the default behavior from v8 onwards
468
471
  */
469
472
  indeterminateCheckboxAction: _propTypes.default.oneOf(['deselect', 'select']),
470
473
  /**
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # MUI X Data Grid Premium
2
2
 
3
3
  This package is the Premium plan edition of the Data Grid components.
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
 
@@ -30,4 +30,4 @@ export declare const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM: {
30
30
  displayOrder: number;
31
31
  };
32
32
  };
33
- export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
33
+ export declare const GridPremiumColumnMenu: React.ForwardRefExoticComponent<GridColumnMenuProps> | React.ForwardRefExoticComponent<GridColumnMenuProps & React.RefAttributes<HTMLUListElement>>;
@@ -11,6 +11,7 @@ exports.GridPremiumColumnMenu = void 0;
11
11
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
12
12
  var React = _interopRequireWildcard(require("react"));
13
13
  var _xDataGridPro = require("@mui/x-data-grid-pro");
14
+ var _forwardRef = require("@mui/x-internals/forwardRef");
14
15
  var _GridColumnMenuAggregationItem = require("./GridColumnMenuAggregationItem");
15
16
  var _rowGrouping = require("../hooks/features/rowGrouping");
16
17
  var _GridColumnMenuRowGroupItem = require("./GridColumnMenuRowGroupItem");
@@ -37,11 +38,10 @@ const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = exports.GRID_COLUMN_MENU_SLOT_PROPS_
37
38
  displayOrder: 27
38
39
  }
39
40
  });
40
- const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
41
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({
42
- ref: ref
43
- }, props, {
41
+ const GridPremiumColumnMenu = exports.GridPremiumColumnMenu = (0, _forwardRef.forwardRef)(function GridPremiumColumnMenuSimple(props, ref) {
42
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_xDataGridPro.GridGenericColumnMenu, (0, _extends2.default)({}, props, {
44
43
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
45
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
44
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
45
+ ref: ref
46
46
  }));
47
47
  });
@@ -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-pro';
8
8
  import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps } from '@mui/x-data-grid-pro/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridPremiumComponent } from "./useDataGridPremiumComponent.js";
10
11
  import { useDataGridPremiumProps } from "./useDataGridPremiumProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
@@ -23,7 +24,7 @@ let dataGridPremiumPropValidators;
23
24
  if (process.env.NODE_ENV !== 'production') {
24
25
  dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
25
26
  }
26
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
27
+ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
27
28
  const props = useDataGridPremiumProps(inProps);
28
29
  const privateApiRef = useDataGridPremiumComponent(props.apiRef, props);
29
30
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
@@ -37,9 +38,9 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
37
38
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
38
39
  className: props.className,
39
40
  style: props.style,
40
- sx: props.sx,
41
- ref: ref
42
- }, props.forwardedProps, {
41
+ sx: props.sx
42
+ }, props.forwardedProps, props.slotProps?.root, {
43
+ ref: ref,
43
44
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
44
45
  children: /*#__PURE__*/_jsx(Watermark, {
45
46
  packageName: "x-data-grid-premium",
@@ -109,6 +110,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
109
110
  */
110
111
  autosizeOptions: PropTypes.shape({
111
112
  columns: PropTypes.arrayOf(PropTypes.string),
113
+ disableColumnVirtualization: PropTypes.bool,
112
114
  expand: PropTypes.bool,
113
115
  includeHeaders: PropTypes.bool,
114
116
  includeOutliers: PropTypes.bool,
@@ -458,6 +460,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
458
460
  * If `deselect`, it will deselect all the rows under it.
459
461
  * Works only if `checkboxSelection` is enabled.
460
462
  * @default "deselect"
463
+ * @deprecated `select` will be the default behavior from v8 onwards
461
464
  */
462
465
  indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
463
466
  /**
@@ -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-pro';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { GridColumnMenuAggregationItem } from "./GridColumnMenuAggregationItem.js";
5
6
  import { isGroupingColumn } from "../hooks/features/rowGrouping/index.js";
6
7
  import { GridColumnMenuRowGroupItem } from "./GridColumnMenuRowGroupItem.js";
@@ -27,11 +28,10 @@ export const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU
27
28
  displayOrder: 27
28
29
  }
29
30
  });
30
- export const GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
31
- return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
32
- ref: ref
33
- }, props, {
31
+ export const GridPremiumColumnMenu = forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
32
+ return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
34
33
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
35
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
34
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
35
+ ref: ref
36
36
  }));
37
37
  });
@@ -48,10 +48,13 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
48
48
  const groupingColDefs = getGroupingColDefs(columnsState);
49
49
  let newColumnFields = [];
50
50
  const newColumnsLookup = {};
51
+ const prevGroupingfields = [];
51
52
 
52
53
  // We only keep the non-grouping columns
53
54
  columnsState.orderedFields.forEach(field => {
54
- if (!isGroupingColumn(field)) {
55
+ if (isGroupingColumn(field)) {
56
+ prevGroupingfields.push(field);
57
+ } else {
55
58
  newColumnFields.push(field);
56
59
  newColumnsLookup[field] = columnsState.lookup[field];
57
60
  }
@@ -66,9 +69,11 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
66
69
  }
67
70
  newColumnsLookup[groupingColDef.field] = groupingColDef;
68
71
  });
69
- const startIndex = newColumnFields[0] === GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
70
- newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
71
- columnsState.orderedFields = newColumnFields;
72
+ if (prevGroupingfields.length !== groupingColDefs.length) {
73
+ const startIndex = newColumnFields[0] === GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
74
+ newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
75
+ columnsState.orderedFields = newColumnFields;
76
+ }
72
77
  columnsState.lookup = newColumnsLookup;
73
78
  return columnsState;
74
79
  }, [getGroupingColDefs]);
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczMzk1NDQwMDAwMA==";
3
+ const releaseInfo = "MTczNTI1MDQwMDAwMA==";
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
@@ -55,10 +55,13 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
55
55
  const groupingColDefs = getGroupingColDefs(columnsState);
56
56
  let newColumnFields = [];
57
57
  const newColumnsLookup = {};
58
+ const prevGroupingfields = [];
58
59
 
59
60
  // We only keep the non-grouping columns
60
61
  columnsState.orderedFields.forEach(field => {
61
- if (!(0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
62
+ if ((0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
63
+ prevGroupingfields.push(field);
64
+ } else {
62
65
  newColumnFields.push(field);
63
66
  newColumnsLookup[field] = columnsState.lookup[field];
64
67
  }
@@ -73,9 +76,11 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
73
76
  }
74
77
  newColumnsLookup[groupingColDef.field] = groupingColDef;
75
78
  });
76
- const startIndex = newColumnFields[0] === _xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
77
- newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
78
- columnsState.orderedFields = newColumnFields;
79
+ if (prevGroupingfields.length !== groupingColDefs.length) {
80
+ const startIndex = newColumnFields[0] === _xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
81
+ newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
82
+ columnsState.orderedFields = newColumnFields;
83
+ }
79
84
  columnsState.lookup = newColumnsLookup;
80
85
  return columnsState;
81
86
  }, [getGroupingColDefs]);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.23.2
2
+ * @mui/x-data-grid-premium v7.23.4
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-pro';
8
8
  import { propValidatorsDataGrid, propValidatorsDataGridPro, validateProps } from '@mui/x-data-grid-pro/internals';
9
+ import { forwardRef } from '@mui/x-internals/forwardRef';
9
10
  import { useDataGridPremiumComponent } from "./useDataGridPremiumComponent.js";
10
11
  import { useDataGridPremiumProps } from "./useDataGridPremiumProps.js";
11
12
  import { getReleaseInfo } from "../utils/releaseInfo.js";
@@ -23,7 +24,7 @@ let dataGridPremiumPropValidators;
23
24
  if (process.env.NODE_ENV !== 'production') {
24
25
  dataGridPremiumPropValidators = [...propValidatorsDataGrid, ...propValidatorsDataGridPro];
25
26
  }
26
- const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremium(inProps, ref) {
27
+ const DataGridPremiumRaw = forwardRef(function DataGridPremium(inProps, ref) {
27
28
  const props = useDataGridPremiumProps(inProps);
28
29
  const privateApiRef = useDataGridPremiumComponent(props.apiRef, props);
29
30
  useLicenseVerifier('x-data-grid-premium', releaseInfo);
@@ -37,9 +38,9 @@ const DataGridPremiumRaw = /*#__PURE__*/React.forwardRef(function DataGridPremiu
37
38
  children: /*#__PURE__*/_jsxs(GridRoot, _extends({
38
39
  className: props.className,
39
40
  style: props.style,
40
- sx: props.sx,
41
- ref: ref
42
- }, props.forwardedProps, {
41
+ sx: props.sx
42
+ }, props.forwardedProps, props.slotProps?.root, {
43
+ ref: ref,
43
44
  children: [/*#__PURE__*/_jsx(GridHeader, {}), /*#__PURE__*/_jsx(GridBody, {
44
45
  children: /*#__PURE__*/_jsx(Watermark, {
45
46
  packageName: "x-data-grid-premium",
@@ -109,6 +110,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
109
110
  */
110
111
  autosizeOptions: PropTypes.shape({
111
112
  columns: PropTypes.arrayOf(PropTypes.string),
113
+ disableColumnVirtualization: PropTypes.bool,
112
114
  expand: PropTypes.bool,
113
115
  includeHeaders: PropTypes.bool,
114
116
  includeOutliers: PropTypes.bool,
@@ -458,6 +460,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
458
460
  * If `deselect`, it will deselect all the rows under it.
459
461
  * Works only if `checkboxSelection` is enabled.
460
462
  * @default "deselect"
463
+ * @deprecated `select` will be the default behavior from v8 onwards
461
464
  */
462
465
  indeterminateCheckboxAction: PropTypes.oneOf(['deselect', 'select']),
463
466
  /**
@@ -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-pro';
4
+ import { forwardRef } from '@mui/x-internals/forwardRef';
4
5
  import { GridColumnMenuAggregationItem } from "./GridColumnMenuAggregationItem.js";
5
6
  import { isGroupingColumn } from "../hooks/features/rowGrouping/index.js";
6
7
  import { GridColumnMenuRowGroupItem } from "./GridColumnMenuRowGroupItem.js";
@@ -27,11 +28,10 @@ export const GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM = _extends({}, GRID_COLUMN_MENU
27
28
  displayOrder: 27
28
29
  }
29
30
  });
30
- export const GridPremiumColumnMenu = /*#__PURE__*/React.forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
31
- return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({
32
- ref: ref
33
- }, props, {
31
+ export const GridPremiumColumnMenu = forwardRef(function GridPremiumColumnMenuSimple(props, ref) {
32
+ return /*#__PURE__*/_jsx(GridGenericColumnMenu, _extends({}, props, {
34
33
  defaultSlots: GRID_COLUMN_MENU_SLOTS_PREMIUM,
35
- defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM
34
+ defaultSlotProps: GRID_COLUMN_MENU_SLOT_PROPS_PREMIUM,
35
+ ref: ref
36
36
  }));
37
37
  });
@@ -48,10 +48,13 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
48
48
  const groupingColDefs = getGroupingColDefs(columnsState);
49
49
  let newColumnFields = [];
50
50
  const newColumnsLookup = {};
51
+ const prevGroupingfields = [];
51
52
 
52
53
  // We only keep the non-grouping columns
53
54
  columnsState.orderedFields.forEach(field => {
54
- if (!isGroupingColumn(field)) {
55
+ if (isGroupingColumn(field)) {
56
+ prevGroupingfields.push(field);
57
+ } else {
55
58
  newColumnFields.push(field);
56
59
  newColumnsLookup[field] = columnsState.lookup[field];
57
60
  }
@@ -66,9 +69,11 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
66
69
  }
67
70
  newColumnsLookup[groupingColDef.field] = groupingColDef;
68
71
  });
69
- const startIndex = newColumnFields[0] === GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
70
- newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
71
- columnsState.orderedFields = newColumnFields;
72
+ if (prevGroupingfields.length !== groupingColDefs.length) {
73
+ const startIndex = newColumnFields[0] === GRID_CHECKBOX_SELECTION_FIELD ? 1 : 0;
74
+ newColumnFields = [...newColumnFields.slice(0, startIndex), ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields.slice(startIndex)];
75
+ columnsState.orderedFields = newColumnFields;
76
+ }
72
77
  columnsState.lookup = newColumnsLookup;
73
78
  return columnsState;
74
79
  }, [getGroupingColDefs]);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v7.23.2
2
+ * @mui/x-data-grid-premium v7.23.4
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 = "MTczMzk1NDQwMDAwMA==";
3
+ const releaseInfo = "MTczNTI1MDQwMDAwMA==";
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-premium",
3
- "version": "7.23.2",
3
+ "version": "7.23.4",
4
4
  "description": "The Premium plan edition of the Data Grid Components (MUI X).",
5
5
  "author": "MUI Team",
6
6
  "main": "./index.js",
@@ -40,9 +40,9 @@
40
40
  "exceljs": "^4.4.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^5.1.1",
43
- "@mui/x-data-grid": "7.23.2",
43
+ "@mui/x-data-grid": "7.23.4",
44
+ "@mui/x-data-grid-pro": "7.23.4",
44
45
  "@mui/x-internals": "7.23.0",
45
- "@mui/x-data-grid-pro": "7.23.2",
46
46
  "@mui/x-license": "7.23.2"
47
47
  },
48
48
  "peerDependencies": {
@@ -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 = "MTczMzk1NDQwMDAwMA==";
9
+ const releaseInfo = "MTczNTI1MDQwMDAwMA==";
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