@mui/x-data-grid-premium 8.0.0-beta.0 → 8.0.0-beta.2

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
@@ -5,6 +5,177 @@
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.0.0-beta.2
9
+
10
+ _Mar 27, 2025_
11
+
12
+ We'd like to offer a big thanks to the 12 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔍 Update the Data Grid quick filter to be collapsed when not in use
15
+ - 🐞 Bugfixes
16
+
17
+ Special thanks go out to the community members for their valuable contributions:
18
+ @lhilgert9.
19
+ Following are all team members who have contributed to this release:
20
+ @alexfauquette, @arminmeh, @flaviendelangle, @hasdfa, @JCQuintas, @KenanYusuf, @LukasTy, @MBilalShafi, @michelengelen, @mnajdova, @romgrk.
21
+
22
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
23
+
24
+ ### Data Grid
25
+
26
+ #### `@mui/x-data-grid@8.0.0-beta.2`
27
+
28
+ - [DataGrid] Fix error caused by trying to render rows that are not in the state anymore (#17057) @arminmeh
29
+ - [DataGrid] Refactor: remove more material (#16922) @romgrk
30
+ - [DataGrid] Update Quick Filter component to be expandable (#16862) @KenanYusuf
31
+ - [DataGrid] Fix crash when used with `@mui/styled-engine-sc` (#17154) @KenanYusuf
32
+
33
+ #### `@mui/x-data-grid-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
34
+
35
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.2`, plus:
36
+
37
+ - [DataGridPro] Data source: Allow expanding groups with unknown children (#17144) @MBilalShafi
38
+
39
+ #### `@mui/x-data-grid-premium@8.0.0-beta.2` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
40
+
41
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.2`.
42
+
43
+ ### Date and Time Pickers
44
+
45
+ #### `@mui/x-date-pickers@8.0.0-beta.2`
46
+
47
+ - [fields] Extract the props of each field slot into a standalone hook for easier re-use (#17114) @flaviendelangle
48
+ - [pickers] Fix visual regression in Date Range Calendar's day (#17148) @flaviendelangle
49
+ - [pickers] Remove all code duplication to apply default values to validation props (#17038) @flaviendelangle
50
+
51
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
52
+
53
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.2`.
54
+
55
+ ### Charts
56
+
57
+ #### `@mui/x-charts@8.0.0-beta.2`
58
+
59
+ - [charts] Memoize axes and series with default (#17156) @alexfauquette
60
+ - [charts] Add pie benchmark (#17115) @JCQuintas
61
+ - [charts] Fix CSS vars support for dark theme (#17106) @alexfauquette
62
+ - [charts] Fix radar hover (#17134) @alexfauquette
63
+ - [charts] Move axis interaction to selectors (#17039) @alexfauquette
64
+ - [charts] Fix Pie benchmark (#17125) @JCQuintas
65
+
66
+ #### `@mui/x-charts-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
67
+
68
+ Same changes as in `@mui/x-charts@8.0.0-beta.2`.
69
+
70
+ ### Tree View
71
+
72
+ #### `@mui/x-tree-view@8.0.0-beta.2`
73
+
74
+ Internal changes.
75
+
76
+ #### `@mui/x-tree-view-pro@8.0.0-beta.2` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
77
+
78
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.2`.
79
+
80
+ ### `@mui/x-codemod@8.0.0-beta.1`
81
+
82
+ - [codemod] Add Data Grid codemods (#17121, #17124) @MBilalShafi
83
+
84
+ ### Docs
85
+
86
+ - [docs] Fix example import for `ExportExcel` component (#17110) @KenanYusuf
87
+
88
+ ### Core
89
+
90
+ - [code-infra] Remove `@mui/styles` dependency & patches (#17071) @mnajdova
91
+ - [code-infra] Add more tests to slow screenshot tests (#17075) @JCQuintas
92
+ - [code-infra] Fix pickers codecov (#17120) @JCQuintas
93
+ - [code-infra] Move `isDeepEqual` to @mui/x-internals (#17129) @JCQuintas
94
+ - [code-infra] Remove `test_regressions` step from React 18 pipeline (#17108) @LukasTy
95
+ - [code-infra] Update some data-grid tests for vitest (#17078, #17104, #17146) @JCQuintas
96
+ - [code-infra] Update some date-pickers tests for vitest (#17083) @JCQuintas
97
+ - [infra] Update `issue-status-label-handler.yml` @michelengelen
98
+ - [infra] Added reusable issue status label handler workflow (#17145) @michelengelen
99
+ - [infra] Switch to reusable 'stale issues/PRs' workflow (#17107) @michelengelen
100
+ - [telemetry] Improve request body size, update dependencies, and optimize SSR handling (#17008) @hasdfa
101
+
102
+ ## 8.0.0-beta.1
103
+
104
+ _Mar 21, 2025_
105
+
106
+ We'd like to offer a big thanks to the 6 contributors who made this release possible. Here are some highlights ✨:
107
+
108
+ - 🐞 Bugfixes
109
+
110
+ Special thanks go out to the community members for their valuable contributions:
111
+ @jyash97.
112
+ Following are all team members who have contributed to this release:
113
+ @alexfauquette, @arminmeh, @flaviendelangle, @JCQuintas, @KenanYusuf.
114
+
115
+ <!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
116
+
117
+ ### Data Grid
118
+
119
+ #### `@mui/x-data-grid@8.0.0-beta.1`
120
+
121
+ - [DataGrid] Fix error caused by `forwardRef` to `ClickAwayListener` (#17049) @arminmeh
122
+ - [DataGrid] Fix error while editing rows with custom id (#17048) @arminmeh
123
+
124
+ #### `@mui/x-data-grid-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
125
+
126
+ Same changes as in `@mui/x-data-grid@8.0.0-beta.1`, plus:
127
+
128
+ - [DataGridPro] Fix header select checkbox state with `checkboxSelectionVisibleOnly` and `paginationMode="server"` (#17026) @arminmeh
129
+
130
+ #### `@mui/x-data-grid-premium@8.0.0-beta.1` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
131
+
132
+ Same changes as in `@mui/x-data-grid-pro@8.0.0-beta.1`, plus:
133
+
134
+ - [DataGridPremium] Update column state correctly when grouping mode is updated with one grouping column (#17069) @arminmeh
135
+
136
+ ### Date and Time Pickers
137
+
138
+ #### `@mui/x-date-pickers@8.0.0-beta.1`
139
+
140
+ - [fields] Clean the `useField` hook (part 1) (#16944) @flaviendelangle
141
+ - [fields] Improve the check for year in `doesSectionFormatHaveLeadingZeros` (#17051) @flaviendelangle
142
+ - [pickers] Deprecate the `disableOpenPicker` prop (#17040) @flaviendelangle
143
+ - [pickers] Simplify the `cleanLeadingZeros` method (#17063) @flaviendelangle
144
+ - [pickers] Use the new `ownerState` in `PickersDay` and `DateRangePickerDay` (#17035) @flaviendelangle
145
+
146
+ #### `@mui/x-date-pickers-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
147
+
148
+ Same changes as in `@mui/x-date-pickers@8.0.0-beta.1`, plus:
149
+
150
+ - [DateRangePicker] Use desktop media query constant on range pickers (#17052) @flaviendelangle
151
+
152
+ ### Charts
153
+
154
+ #### `@mui/x-charts@8.0.0-beta.1`
155
+
156
+ - [charts] Fix horizontal bar with multiple axes (#17059) @alexfauquette
157
+
158
+ #### `@mui/x-charts-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
159
+
160
+ Same changes as in `@mui/x-charts@8.0.0-beta.1`, plus:
161
+
162
+ - [charts-pro] Allow disabling Heatmap tooltip (#17060) @JCQuintas
163
+
164
+ ### Tree View
165
+
166
+ #### `@mui/x-tree-view@8.0.0-beta.1`
167
+
168
+ Internal changes.
169
+
170
+ #### `@mui/x-tree-view-pro@8.0.0-beta.1` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
171
+
172
+ Same changes as in `@mui/x-tree-view@8.0.0-beta.1`.
173
+
174
+ ### Docs
175
+
176
+ - [docs] Fix 404 (#17033) @alexfauquette
177
+ - [docs] Fix Data Grid advanced list view demo (#17064) @KenanYusuf
178
+
8
179
  ## 8.0.0-beta.0
9
180
 
10
181
  <img width="100%" alt="MUI X v8 Beta is live" src="https://github.com/user-attachments/assets/61ec4dd8-c946-456b-8b45-d51de8772f5d">
@@ -152,6 +152,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
152
152
  * Override or extend the styles applied to the component.
153
153
  */
154
154
  classes: _propTypes.default.object,
155
+ className: _propTypes.default.string,
155
156
  /**
156
157
  * The character used to separate cell values when copying to the clipboard.
157
158
  * @default '\t'
@@ -1077,6 +1078,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1077
1078
  * @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }
1078
1079
  */
1079
1080
  splitClipboardPastedText: _propTypes.default.func,
1081
+ style: _propTypes.default.object,
1080
1082
  /**
1081
1083
  * The system prop that allows defining system overrides as well as additional CSS styles.
1082
1084
  */
@@ -57,7 +57,7 @@ function GridGroupingCriteriaCellIcon(props) {
57
57
  })
58
58
  });
59
59
  }
60
- return descendantCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
60
+ return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
61
61
  size: "small",
62
62
  onClick: handleClick,
63
63
  tabIndex: -1,
@@ -90,7 +90,7 @@ function GridDataSourceGroupingCriteriaCell(props) {
90
90
  const classes = useUtilityClasses(rootProps);
91
91
  let descendantCount = 0;
92
92
  if (row) {
93
- descendantCount = Math.max(rootProps.dataSource?.getChildrenCount?.(row) ?? 0, 0);
93
+ descendantCount = rootProps.dataSource?.getChildrenCount?.(row) ?? 0;
94
94
  }
95
95
  let cellContent;
96
96
  const colDef = apiRef.current.getColumn(rowNode.groupingField);
@@ -145,6 +145,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
145
145
  * Override or extend the styles applied to the component.
146
146
  */
147
147
  classes: PropTypes.object,
148
+ className: PropTypes.string,
148
149
  /**
149
150
  * The character used to separate cell values when copying to the clipboard.
150
151
  * @default '\t'
@@ -1070,6 +1071,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1070
1071
  * @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }
1071
1072
  */
1072
1073
  splitClipboardPastedText: PropTypes.func,
1074
+ style: PropTypes.object,
1073
1075
  /**
1074
1076
  * The system prop that allows defining system overrides as well as additional CSS styles.
1075
1077
  */
@@ -49,7 +49,7 @@ function GridGroupingCriteriaCellIcon(props) {
49
49
  })
50
50
  });
51
51
  }
52
- return descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
52
+ return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
53
53
  size: "small",
54
54
  onClick: handleClick,
55
55
  tabIndex: -1,
@@ -82,7 +82,7 @@ export function GridDataSourceGroupingCriteriaCell(props) {
82
82
  const classes = useUtilityClasses(rootProps);
83
83
  let descendantCount = 0;
84
84
  if (row) {
85
- descendantCount = Math.max(rootProps.dataSource?.getChildrenCount?.(row) ?? 0, 0);
85
+ descendantCount = rootProps.dataSource?.getChildrenCount?.(row) ?? 0;
86
86
  }
87
87
  let cellContent;
88
88
  const colDef = apiRef.current.getColumn(rowNode.groupingField);
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { unstable_capitalize as capitalize } from '@mui/utils';
3
3
  import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
4
4
  import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
5
- import { addPinnedRow, isDeepEqual, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
5
+ import { addPinnedRow, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
6
+ import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
6
7
  export const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
7
8
  export const getAggregationFooterRowIdFromGroupId = groupId => {
8
9
  if (groupId == null) {
@@ -48,13 +48,10 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
48
48
  const groupingColDefs = getGroupingColDefs(columnsState);
49
49
  let newColumnFields = [];
50
50
  const newColumnsLookup = {};
51
- const prevGroupingfields = [];
52
51
 
53
52
  // We only keep the non-grouping columns
54
53
  columnsState.orderedFields.forEach(field => {
55
- if (isGroupingColumn(field)) {
56
- prevGroupingfields.push(field);
57
- } else {
54
+ if (!isGroupingColumn(field)) {
58
55
  newColumnFields.push(field);
59
56
  newColumnsLookup[field] = columnsState.lookup[field];
60
57
  }
@@ -69,11 +66,10 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
69
66
  }
70
67
  newColumnsLookup[groupingColDef.field] = groupingColDef;
71
68
  });
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
- }
69
+ const checkBoxFieldIndex = newColumnFields.findIndex(field => field === GRID_CHECKBOX_SELECTION_FIELD);
70
+ const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
71
+ newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
72
+ columnsState.orderedFields = newColumnFields;
77
73
  columnsState.lookup = newColumnsLookup;
78
74
  return columnsState;
79
75
  }, [getGroupingColDefs]);
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.0.0-beta.0
2
+ * @mui/x-data-grid-premium v8.0.0-beta.2
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 = "MTc0MjI0ODgwMDAwMA==";
3
+ const releaseInfo = "MTc0MzExMjgwMDAwMA==";
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
@@ -10,6 +10,7 @@ var _utils = require("@mui/utils");
10
10
  var _internals = require("@mui/x-data-grid/internals");
11
11
  var _xDataGridPro = require("@mui/x-data-grid-pro");
12
12
  var _internals2 = require("@mui/x-data-grid-pro/internals");
13
+ var _isDeepEqual = require("@mui/x-internals/isDeepEqual");
13
14
  const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = exports.GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
14
15
  const getAggregationFooterRowIdFromGroupId = groupId => {
15
16
  if (groupId == null) {
@@ -162,7 +163,7 @@ exports.addFooterRows = addFooterRows;
162
163
  const areAggregationRulesEqual = (previousValue, newValue) => {
163
164
  const previousFields = Object.keys(previousValue ?? {});
164
165
  const newFields = Object.keys(newValue);
165
- if (!(0, _internals2.isDeepEqual)(previousFields, newFields)) {
166
+ if (!(0, _isDeepEqual.isDeepEqual)(previousFields, newFields)) {
166
167
  return false;
167
168
  }
168
169
  return newFields.every(field => {
@@ -55,13 +55,10 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
55
55
  const groupingColDefs = getGroupingColDefs(columnsState);
56
56
  let newColumnFields = [];
57
57
  const newColumnsLookup = {};
58
- const prevGroupingfields = [];
59
58
 
60
59
  // We only keep the non-grouping columns
61
60
  columnsState.orderedFields.forEach(field => {
62
- if ((0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
63
- prevGroupingfields.push(field);
64
- } else {
61
+ if (!(0, _gridRowGroupingUtils.isGroupingColumn)(field)) {
65
62
  newColumnFields.push(field);
66
63
  newColumnsLookup[field] = columnsState.lookup[field];
67
64
  }
@@ -76,11 +73,10 @@ const useGridRowGroupingPreProcessors = (apiRef, props) => {
76
73
  }
77
74
  newColumnsLookup[groupingColDef.field] = groupingColDef;
78
75
  });
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
- }
76
+ const checkBoxFieldIndex = newColumnFields.findIndex(field => field === _xDataGridPro.GRID_CHECKBOX_SELECTION_FIELD);
77
+ const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
78
+ newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
79
+ columnsState.orderedFields = newColumnFields;
84
80
  columnsState.lookup = newColumnsLookup;
85
81
  return columnsState;
86
82
  }, [getGroupingColDefs]);
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.0.0-beta.0
2
+ * @mui/x-data-grid-premium v8.0.0-beta.2
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -145,6 +145,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
145
145
  * Override or extend the styles applied to the component.
146
146
  */
147
147
  classes: PropTypes.object,
148
+ className: PropTypes.string,
148
149
  /**
149
150
  * The character used to separate cell values when copying to the clipboard.
150
151
  * @default '\t'
@@ -1070,6 +1071,7 @@ process.env.NODE_ENV !== "production" ? DataGridPremiumRaw.propTypes = {
1070
1071
  * @default (pastedText) => { const text = pastedText.replace(/\r?\n$/, ''); return text.split(/\r\n|\n|\r/).map((row) => row.split('\t')); }
1071
1072
  */
1072
1073
  splitClipboardPastedText: PropTypes.func,
1074
+ style: PropTypes.object,
1073
1075
  /**
1074
1076
  * The system prop that allows defining system overrides as well as additional CSS styles.
1075
1077
  */
@@ -49,7 +49,7 @@ function GridGroupingCriteriaCellIcon(props) {
49
49
  })
50
50
  });
51
51
  }
52
- return descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
52
+ return descendantCount === -1 || descendantCount > 0 ? /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
53
53
  size: "small",
54
54
  onClick: handleClick,
55
55
  tabIndex: -1,
@@ -82,7 +82,7 @@ export function GridDataSourceGroupingCriteriaCell(props) {
82
82
  const classes = useUtilityClasses(rootProps);
83
83
  let descendantCount = 0;
84
84
  if (row) {
85
- descendantCount = Math.max(rootProps.dataSource?.getChildrenCount?.(row) ?? 0, 0);
85
+ descendantCount = rootProps.dataSource?.getChildrenCount?.(row) ?? 0;
86
86
  }
87
87
  let cellContent;
88
88
  const colDef = apiRef.current.getColumn(rowNode.groupingField);
@@ -2,7 +2,8 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import { unstable_capitalize as capitalize } from '@mui/utils';
3
3
  import { GRID_ID_AUTOGENERATED } from '@mui/x-data-grid/internals';
4
4
  import { GRID_ROOT_GROUP_ID } from '@mui/x-data-grid-pro';
5
- import { addPinnedRow, isDeepEqual, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
5
+ import { addPinnedRow, insertNodeInTree, removeNodeFromTree } from '@mui/x-data-grid-pro/internals';
6
+ import { isDeepEqual } from '@mui/x-internals/isDeepEqual';
6
7
  export const GRID_AGGREGATION_ROOT_FOOTER_ROW_ID = 'auto-generated-group-footer-root';
7
8
  export const getAggregationFooterRowIdFromGroupId = groupId => {
8
9
  if (groupId == null) {
@@ -48,13 +48,10 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
48
48
  const groupingColDefs = getGroupingColDefs(columnsState);
49
49
  let newColumnFields = [];
50
50
  const newColumnsLookup = {};
51
- const prevGroupingfields = [];
52
51
 
53
52
  // We only keep the non-grouping columns
54
53
  columnsState.orderedFields.forEach(field => {
55
- if (isGroupingColumn(field)) {
56
- prevGroupingfields.push(field);
57
- } else {
54
+ if (!isGroupingColumn(field)) {
58
55
  newColumnFields.push(field);
59
56
  newColumnsLookup[field] = columnsState.lookup[field];
60
57
  }
@@ -69,11 +66,10 @@ export const useGridRowGroupingPreProcessors = (apiRef, props) => {
69
66
  }
70
67
  newColumnsLookup[groupingColDef.field] = groupingColDef;
71
68
  });
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
- }
69
+ const checkBoxFieldIndex = newColumnFields.findIndex(field => field === GRID_CHECKBOX_SELECTION_FIELD);
70
+ const checkBoxColumn = checkBoxFieldIndex !== -1 ? newColumnFields.splice(checkBoxFieldIndex, 1) : [];
71
+ newColumnFields = [...checkBoxColumn, ...groupingColDefs.map(colDef => colDef.field), ...newColumnFields];
72
+ columnsState.orderedFields = newColumnFields;
77
73
  columnsState.lookup = newColumnsLookup;
78
74
  return columnsState;
79
75
  }, [getGroupingColDefs]);
package/modern/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.0.0-beta.0
2
+ * @mui/x-data-grid-premium v8.0.0-beta.2
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 = "MTc0MjI0ODgwMDAwMA==";
3
+ const releaseInfo = "MTc0MzExMjgwMDAwMA==";
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": "8.0.0-beta.0",
3
+ "version": "8.0.0-beta.2",
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,10 +40,10 @@
40
40
  "exceljs": "^4.4.0",
41
41
  "prop-types": "^15.8.1",
42
42
  "reselect": "^5.1.1",
43
- "@mui/x-data-grid": "8.0.0-beta.0",
44
- "@mui/x-data-grid-pro": "8.0.0-beta.0",
45
- "@mui/x-internals": "8.0.0-beta.0",
46
- "@mui/x-license": "8.0.0-beta.0"
43
+ "@mui/x-internals": "8.0.0-beta.2",
44
+ "@mui/x-license": "8.0.0-beta.2",
45
+ "@mui/x-data-grid-pro": "8.0.0-beta.2",
46
+ "@mui/x-data-grid": "8.0.0-beta.2"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "@emotion/react": "^11.9.0",