@mui/x-data-grid-pro 7.22.0 → 7.22.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 +126 -0
- package/esm/hooks/features/dataSource/useGridDataSource.js +0 -2
- package/esm/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +2 -1
- package/esm/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +1 -0
- package/esm/hooks/features/treeData/gridTreeDataGroupColDef.js +2 -1
- package/esm/hooks/features/treeData/useGridTreeData.js +1 -1
- package/esm/utils/releaseInfo.js +1 -1
- package/hooks/features/dataSource/useGridDataSource.js +0 -2
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.d.ts +2 -1
- package/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +9 -3
- package/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +1 -0
- package/hooks/features/treeData/gridTreeDataGroupColDef.d.ts +2 -1
- package/hooks/features/treeData/gridTreeDataGroupColDef.js +9 -3
- package/hooks/features/treeData/useGridTreeData.js +1 -1
- package/index.js +1 -1
- package/modern/hooks/features/dataSource/useGridDataSource.js +0 -2
- package/modern/hooks/features/detailPanel/gridDetailPanelToggleColDef.js +2 -1
- package/modern/hooks/features/rowReorder/useGridRowReorderPreProcessors.js +1 -0
- package/modern/hooks/features/treeData/gridTreeDataGroupColDef.js +2 -1
- package/modern/hooks/features/treeData/useGridTreeData.js +1 -1
- package/modern/index.js +1 -1
- package/modern/utils/releaseInfo.js +1 -1
- package/package.json +3 -3
- package/utils/releaseInfo.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,132 @@
|
|
|
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.22.2
|
|
7
|
+
|
|
8
|
+
_Nov 8, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
11
|
+
|
|
12
|
+
- 👨🏽💻 API enhancements
|
|
13
|
+
- 🐞 Bugfixes
|
|
14
|
+
|
|
15
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
16
|
+
@clins1994, @GuillaumeMeheut, @k-rajat19.
|
|
17
|
+
Following are all team members who have contributed to this release:
|
|
18
|
+
@LukasTy, @MBilalShafi, @KenanYusuf, @arminmeh.
|
|
19
|
+
|
|
20
|
+
### Upcoming alpha
|
|
21
|
+
|
|
22
|
+
Keep an eye out for the MUI⠀X `v8.0.0-aplha.0` release soon. It will follow a weekly release schedule as always until it is stable.
|
|
23
|
+
|
|
24
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
25
|
+
|
|
26
|
+
### Data Grid
|
|
27
|
+
|
|
28
|
+
#### `@mui/x-data-grid@7.22.2`
|
|
29
|
+
|
|
30
|
+
- [DataGrid] Fix `null` reference error in `GridVirtualScrollbar` (#15289) @MBilalShafi
|
|
31
|
+
- [DataGrid] Fix filtering with `boolean` column type (#15257) @k-rajat19
|
|
32
|
+
- [DataGrid] Improve row selection propagation trigger (#15274) @MBilalShafi
|
|
33
|
+
- [DataGrid] Preprocess edit cell props on backspace/delete (#15223) @KenanYusuf
|
|
34
|
+
- [DataGrid] Add a recipe to persist column width and order (#15309) @MBilalShafi
|
|
35
|
+
|
|
36
|
+
#### `@mui/x-data-grid-pro@7.22.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
37
|
+
|
|
38
|
+
Same changes as in `@mui/x-data-grid@7.22.2`, plus:
|
|
39
|
+
|
|
40
|
+
- [DataGridPro] Apply default properties if they are not passed in a reorder column (#15320) @k-rajat19
|
|
41
|
+
- [DataGridPro] Toggle row expansion with `Enter` key in Tree data (#15313) @k-rajat19
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-data-grid-premium@7.22.2` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
44
|
+
|
|
45
|
+
Same changes as in `@mui/x-data-grid-pro@7.22.2`, plus:
|
|
46
|
+
|
|
47
|
+
- [DataGridPremium] Fix incorrect rows selection count when selection propagation is enabled with row grouping (#15222) @arminmeh
|
|
48
|
+
|
|
49
|
+
### Date and Time Pickers
|
|
50
|
+
|
|
51
|
+
#### `@mui/x-date-pickers@7.22.2`
|
|
52
|
+
|
|
53
|
+
- [pickers] Add support for `moment-hijri@3.0.0` (#15248) @LukasTy
|
|
54
|
+
|
|
55
|
+
#### `@mui/x-date-pickers-pro@7.22.2` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
56
|
+
|
|
57
|
+
Same changes as in `@mui/x-date-pickers@7.22.2`.
|
|
58
|
+
|
|
59
|
+
### Charts
|
|
60
|
+
|
|
61
|
+
#### `@mui/x-charts@7.22.2`
|
|
62
|
+
|
|
63
|
+
- [charts] Allow `SeriesValueFormatter` to return `null` value (#15295) @clins1994
|
|
64
|
+
- [charts] Allow configuring the `domainLimit` for each axis. (#15325) @GuillaumeMeheut
|
|
65
|
+
|
|
66
|
+
#### `@mui/x-charts-pro@7.0.0-beta.7` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
67
|
+
|
|
68
|
+
Same changes as in `@mui/x-charts@7.22.2`.
|
|
69
|
+
|
|
70
|
+
## 7.22.1
|
|
71
|
+
|
|
72
|
+
_Nov 1, 2024_
|
|
73
|
+
|
|
74
|
+
We'd like to offer a big thanks to the 7 contributors who made this release possible. Here are some highlights ✨:
|
|
75
|
+
|
|
76
|
+
- 🐞 Bugfixes
|
|
77
|
+
- 📚 Documentation improvements
|
|
78
|
+
- 🌍 Improve Polish (pl-PL) locale on the Date Pickers
|
|
79
|
+
|
|
80
|
+
Special thanks go out to the community contributors who have helped make this release possible:
|
|
81
|
+
@wojtkolos, @dpak-maurya, @k-rajat19.
|
|
82
|
+
Following are all team members who have contributed to this release:
|
|
83
|
+
@LukasTy, @arminmeh, @MBilalShafi, @KenanYusuf, @flaviendelangle.
|
|
84
|
+
|
|
85
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
86
|
+
|
|
87
|
+
### Data Grid
|
|
88
|
+
|
|
89
|
+
#### `@mui/x-data-grid@7.22.1`
|
|
90
|
+
|
|
91
|
+
- [DataGrid] Fix right column group header border (#15152) @KenanYusuf
|
|
92
|
+
- [DataGrid] Fix scroll jump when holding down arrow keys (#15167) @arminmeh
|
|
93
|
+
- [DataGrid] Move `rowGroupingModelChange` handler to respective hook (#15127) @MBilalShafi
|
|
94
|
+
- [DataGrid] Prevent error when deleting the last row (#15153) @dpak-maurya
|
|
95
|
+
- [DataGrid] Fix overlay height in autoHeight mode (#15205) @cherniavskii
|
|
96
|
+
|
|
97
|
+
#### `@mui/x-data-grid-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
98
|
+
|
|
99
|
+
Same changes as in `@mui/x-data-grid@7.22.1`, plus:
|
|
100
|
+
|
|
101
|
+
- [DataGridPro] Add list view tests (#15166) @KenanYusuf
|
|
102
|
+
|
|
103
|
+
#### `@mui/x-data-grid-premium@7.22.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
104
|
+
|
|
105
|
+
- [DataGridPremium] Keep focus on the grouping cell on space bar press #15155 @k-rajat19
|
|
106
|
+
|
|
107
|
+
### Date and Time Pickers
|
|
108
|
+
|
|
109
|
+
#### `@mui/x-date-pickers@7.22.1`
|
|
110
|
+
|
|
111
|
+
- [l10n] Improve Polish (pl-PL) locale (#15177) @wojtkolos
|
|
112
|
+
|
|
113
|
+
#### `@mui/x-date-pickers-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
114
|
+
|
|
115
|
+
Same changes as in `@mui/x-date-pickers@7.22.1`.
|
|
116
|
+
|
|
117
|
+
### Tree View
|
|
118
|
+
|
|
119
|
+
#### `@mui/x-tree-view@7.22.1`
|
|
120
|
+
|
|
121
|
+
- [TreeView] Export `TreeItem2DragAndDropOverlay` and `TreeItem2LabelInput` from the root of each package (#15208) @flaviendelangle
|
|
122
|
+
- [TreeView] Fix drag and drop color usage (#15149) @LukasTy
|
|
123
|
+
|
|
124
|
+
#### `@mui/x-tree-view-pro@7.22.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
125
|
+
|
|
126
|
+
Same changes as in `@mui/x-tree-view@7.22.1`.
|
|
127
|
+
|
|
128
|
+
### Docs
|
|
129
|
+
|
|
130
|
+
- [docs] Add section explaining how to keep the selection while filtering in Data grid docs (#15199) @arminmeh
|
|
131
|
+
|
|
6
132
|
## 7.22.0
|
|
7
133
|
|
|
8
134
|
_Oct 25, 2024_
|
|
@@ -194,8 +194,6 @@ export const useGridDataSource = (apiRef, props) => {
|
|
|
194
194
|
useGridApiEventHandler(apiRef, 'sortModelChange', runIfServerMode(props.sortingMode, fetchRows));
|
|
195
195
|
useGridApiEventHandler(apiRef, 'filterModelChange', runIfServerMode(props.filterMode, fetchRows));
|
|
196
196
|
useGridApiEventHandler(apiRef, 'paginationModelChange', runIfServerMode(props.paginationMode, fetchRows));
|
|
197
|
-
// @ts-ignore - Event is not defined in the Pro API
|
|
198
|
-
useGridApiEventHandler(apiRef, 'rowGroupingModelChange', () => fetchRows());
|
|
199
197
|
const isFirstRender = React.useRef(true);
|
|
200
198
|
React.useEffect(() => {
|
|
201
199
|
if (isFirstRender.current) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { GRID_STRING_COL_DEF } from '@mui/x-data-grid';
|
|
4
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '@mui/x-data-grid/internals';
|
|
4
5
|
import { GridDetailPanelToggleCell } from "../../../components/GridDetailPanelToggleCell.js";
|
|
5
6
|
import { gridDetailPanelExpandedRowIdsSelector } from "./gridDetailPanelSelector.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export
|
|
8
|
+
export { GRID_DETAIL_PANEL_TOGGLE_FIELD };
|
|
8
9
|
export const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
9
10
|
type: 'custom',
|
|
10
11
|
field: GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
@@ -30,6 +30,7 @@ export const useGridRowReorderPreProcessors = (privateApiRef, props) => {
|
|
|
30
30
|
const shouldHaveReorderColumn = props.rowReordering;
|
|
31
31
|
const haveReorderColumn = columnsState.lookup[reorderColumn.field] != null;
|
|
32
32
|
if (shouldHaveReorderColumn && haveReorderColumn) {
|
|
33
|
+
columnsState.lookup[reorderColumn.field] = _extends({}, reorderColumn, columnsState.lookup[reorderColumn.field]);
|
|
33
34
|
return columnsState;
|
|
34
35
|
}
|
|
35
36
|
if (shouldHaveReorderColumn && !haveReorderColumn) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GRID_STRING_COL_DEF } from '@mui/x-data-grid';
|
|
3
|
+
import { GRID_TREE_DATA_GROUPING_FIELD } from '@mui/x-data-grid/internals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* TODO: Add sorting and filtering on the value and the filteredDescendantCount
|
|
@@ -18,7 +19,7 @@ export const GRID_TREE_DATA_GROUPING_COL_DEF = _extends({}, GRID_STRING_COL_DEF,
|
|
|
18
19
|
return rowNode?.type === 'group' || rowNode?.type === 'leaf' ? rowNode.groupingKey : undefined;
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
|
-
export
|
|
22
|
+
export { GRID_TREE_DATA_GROUPING_FIELD };
|
|
22
23
|
export const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
|
|
23
24
|
field: GRID_TREE_DATA_GROUPING_FIELD,
|
|
24
25
|
editable: false,
|
|
@@ -7,7 +7,7 @@ export const useGridTreeData = (apiRef, props) => {
|
|
|
7
7
|
*/
|
|
8
8
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
9
9
|
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
|
10
|
-
if (cellParams.colDef.field === GRID_TREE_DATA_GROUPING_FIELD && event.key === ' ' && !event.shiftKey) {
|
|
10
|
+
if (cellParams.colDef.field === GRID_TREE_DATA_GROUPING_FIELD && (event.key === ' ' || event.key === 'Enter') && !event.shiftKey) {
|
|
11
11
|
if (params.rowNode.type !== 'group') {
|
|
12
12
|
return;
|
|
13
13
|
}
|
package/esm/utils/releaseInfo.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMTAyMDQwMDAwMA==";
|
|
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
|
|
@@ -203,8 +203,6 @@ const useGridDataSource = (apiRef, props) => {
|
|
|
203
203
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'sortModelChange', (0, _utils.runIfServerMode)(props.sortingMode, fetchRows));
|
|
204
204
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'filterModelChange', (0, _utils.runIfServerMode)(props.filterMode, fetchRows));
|
|
205
205
|
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'paginationModelChange', (0, _utils.runIfServerMode)(props.paginationMode, fetchRows));
|
|
206
|
-
// @ts-ignore - Event is not defined in the Pro API
|
|
207
|
-
(0, _xDataGrid.useGridApiEventHandler)(apiRef, 'rowGroupingModelChange', () => fetchRows());
|
|
208
206
|
const isFirstRender = React.useRef(true);
|
|
209
207
|
React.useEffect(() => {
|
|
210
208
|
if (isFirstRender.current) {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { GridColDef } from '@mui/x-data-grid';
|
|
2
|
-
|
|
2
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '@mui/x-data-grid/internals';
|
|
3
|
+
export { GRID_DETAIL_PANEL_TOGGLE_FIELD };
|
|
3
4
|
export declare const GRID_DETAIL_PANEL_TOGGLE_COL_DEF: GridColDef;
|
|
@@ -5,17 +5,23 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.
|
|
8
|
+
exports.GRID_DETAIL_PANEL_TOGGLE_COL_DEF = void 0;
|
|
9
|
+
Object.defineProperty(exports, "GRID_DETAIL_PANEL_TOGGLE_FIELD", {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () {
|
|
12
|
+
return _internals.GRID_DETAIL_PANEL_TOGGLE_FIELD;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
9
15
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
16
|
var React = _interopRequireWildcard(require("react"));
|
|
11
17
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
18
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
12
19
|
var _GridDetailPanelToggleCell = require("../../../components/GridDetailPanelToggleCell");
|
|
13
20
|
var _gridDetailPanelSelector = require("./gridDetailPanelSelector");
|
|
14
21
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
const GRID_DETAIL_PANEL_TOGGLE_FIELD = exports.GRID_DETAIL_PANEL_TOGGLE_FIELD = '__detail_panel_toggle__';
|
|
16
22
|
const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = exports.GRID_DETAIL_PANEL_TOGGLE_COL_DEF = (0, _extends2.default)({}, _xDataGrid.GRID_STRING_COL_DEF, {
|
|
17
23
|
type: 'custom',
|
|
18
|
-
field: GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
24
|
+
field: _internals.GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
19
25
|
editable: false,
|
|
20
26
|
sortable: false,
|
|
21
27
|
filterable: false,
|
|
@@ -38,6 +38,7 @@ const useGridRowReorderPreProcessors = (privateApiRef, props) => {
|
|
|
38
38
|
const shouldHaveReorderColumn = props.rowReordering;
|
|
39
39
|
const haveReorderColumn = columnsState.lookup[reorderColumn.field] != null;
|
|
40
40
|
if (shouldHaveReorderColumn && haveReorderColumn) {
|
|
41
|
+
columnsState.lookup[reorderColumn.field] = (0, _extends2.default)({}, reorderColumn, columnsState.lookup[reorderColumn.field]);
|
|
41
42
|
return columnsState;
|
|
42
43
|
}
|
|
43
44
|
if (shouldHaveReorderColumn && !haveReorderColumn) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { GridColDef } from '@mui/x-data-grid';
|
|
2
|
+
import { GRID_TREE_DATA_GROUPING_FIELD } from '@mui/x-data-grid/internals';
|
|
2
3
|
/**
|
|
3
4
|
* TODO: Add sorting and filtering on the value and the filteredDescendantCount
|
|
4
5
|
*/
|
|
5
6
|
export declare const GRID_TREE_DATA_GROUPING_COL_DEF: Omit<GridColDef, 'field' | 'editable'>;
|
|
6
|
-
export
|
|
7
|
+
export { GRID_TREE_DATA_GROUPING_FIELD };
|
|
7
8
|
export declare const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES: Pick<GridColDef, 'field' | 'editable' | 'groupable'>;
|
|
@@ -4,9 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.
|
|
7
|
+
exports.GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = exports.GRID_TREE_DATA_GROUPING_COL_DEF = void 0;
|
|
8
|
+
Object.defineProperty(exports, "GRID_TREE_DATA_GROUPING_FIELD", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _internals.GRID_TREE_DATA_GROUPING_FIELD;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
8
14
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
15
|
var _xDataGrid = require("@mui/x-data-grid");
|
|
16
|
+
var _internals = require("@mui/x-data-grid/internals");
|
|
10
17
|
/**
|
|
11
18
|
* TODO: Add sorting and filtering on the value and the filteredDescendantCount
|
|
12
19
|
*/
|
|
@@ -24,9 +31,8 @@ const GRID_TREE_DATA_GROUPING_COL_DEF = exports.GRID_TREE_DATA_GROUPING_COL_DEF
|
|
|
24
31
|
return rowNode?.type === 'group' || rowNode?.type === 'leaf' ? rowNode.groupingKey : undefined;
|
|
25
32
|
}
|
|
26
33
|
});
|
|
27
|
-
const GRID_TREE_DATA_GROUPING_FIELD = exports.GRID_TREE_DATA_GROUPING_FIELD = '__tree_data_group__';
|
|
28
34
|
const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = exports.GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
|
|
29
|
-
field: GRID_TREE_DATA_GROUPING_FIELD,
|
|
35
|
+
field: _internals.GRID_TREE_DATA_GROUPING_FIELD,
|
|
30
36
|
editable: false,
|
|
31
37
|
groupable: false
|
|
32
38
|
};
|
|
@@ -14,7 +14,7 @@ const useGridTreeData = (apiRef, props) => {
|
|
|
14
14
|
*/
|
|
15
15
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
16
16
|
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
|
17
|
-
if (cellParams.colDef.field === _gridTreeDataGroupColDef.GRID_TREE_DATA_GROUPING_FIELD && event.key === ' ' && !event.shiftKey) {
|
|
17
|
+
if (cellParams.colDef.field === _gridTreeDataGroupColDef.GRID_TREE_DATA_GROUPING_FIELD && (event.key === ' ' || event.key === 'Enter') && !event.shiftKey) {
|
|
18
18
|
if (params.rowNode.type !== 'group') {
|
|
19
19
|
return;
|
|
20
20
|
}
|
package/index.js
CHANGED
|
@@ -194,8 +194,6 @@ export const useGridDataSource = (apiRef, props) => {
|
|
|
194
194
|
useGridApiEventHandler(apiRef, 'sortModelChange', runIfServerMode(props.sortingMode, fetchRows));
|
|
195
195
|
useGridApiEventHandler(apiRef, 'filterModelChange', runIfServerMode(props.filterMode, fetchRows));
|
|
196
196
|
useGridApiEventHandler(apiRef, 'paginationModelChange', runIfServerMode(props.paginationMode, fetchRows));
|
|
197
|
-
// @ts-ignore - Event is not defined in the Pro API
|
|
198
|
-
useGridApiEventHandler(apiRef, 'rowGroupingModelChange', () => fetchRows());
|
|
199
197
|
const isFirstRender = React.useRef(true);
|
|
200
198
|
React.useEffect(() => {
|
|
201
199
|
if (isFirstRender.current) {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { GRID_STRING_COL_DEF } from '@mui/x-data-grid';
|
|
4
|
+
import { GRID_DETAIL_PANEL_TOGGLE_FIELD } from '@mui/x-data-grid/internals';
|
|
4
5
|
import { GridDetailPanelToggleCell } from "../../../components/GridDetailPanelToggleCell.js";
|
|
5
6
|
import { gridDetailPanelExpandedRowIdsSelector } from "./gridDetailPanelSelector.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
-
export
|
|
8
|
+
export { GRID_DETAIL_PANEL_TOGGLE_FIELD };
|
|
8
9
|
export const GRID_DETAIL_PANEL_TOGGLE_COL_DEF = _extends({}, GRID_STRING_COL_DEF, {
|
|
9
10
|
type: 'custom',
|
|
10
11
|
field: GRID_DETAIL_PANEL_TOGGLE_FIELD,
|
|
@@ -30,6 +30,7 @@ export const useGridRowReorderPreProcessors = (privateApiRef, props) => {
|
|
|
30
30
|
const shouldHaveReorderColumn = props.rowReordering;
|
|
31
31
|
const haveReorderColumn = columnsState.lookup[reorderColumn.field] != null;
|
|
32
32
|
if (shouldHaveReorderColumn && haveReorderColumn) {
|
|
33
|
+
columnsState.lookup[reorderColumn.field] = _extends({}, reorderColumn, columnsState.lookup[reorderColumn.field]);
|
|
33
34
|
return columnsState;
|
|
34
35
|
}
|
|
35
36
|
if (shouldHaveReorderColumn && !haveReorderColumn) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import { GRID_STRING_COL_DEF } from '@mui/x-data-grid';
|
|
3
|
+
import { GRID_TREE_DATA_GROUPING_FIELD } from '@mui/x-data-grid/internals';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* TODO: Add sorting and filtering on the value and the filteredDescendantCount
|
|
@@ -18,7 +19,7 @@ export const GRID_TREE_DATA_GROUPING_COL_DEF = _extends({}, GRID_STRING_COL_DEF,
|
|
|
18
19
|
return rowNode?.type === 'group' || rowNode?.type === 'leaf' ? rowNode.groupingKey : undefined;
|
|
19
20
|
}
|
|
20
21
|
});
|
|
21
|
-
export
|
|
22
|
+
export { GRID_TREE_DATA_GROUPING_FIELD };
|
|
22
23
|
export const GRID_TREE_DATA_GROUPING_COL_DEF_FORCED_PROPERTIES = {
|
|
23
24
|
field: GRID_TREE_DATA_GROUPING_FIELD,
|
|
24
25
|
editable: false,
|
|
@@ -7,7 +7,7 @@ export const useGridTreeData = (apiRef, props) => {
|
|
|
7
7
|
*/
|
|
8
8
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
9
9
|
const cellParams = apiRef.current.getCellParams(params.id, params.field);
|
|
10
|
-
if (cellParams.colDef.field === GRID_TREE_DATA_GROUPING_FIELD && event.key === ' ' && !event.shiftKey) {
|
|
10
|
+
if (cellParams.colDef.field === GRID_TREE_DATA_GROUPING_FIELD && (event.key === ' ' || event.key === 'Enter') && !event.shiftKey) {
|
|
11
11
|
if (params.rowNode.type !== 'group') {
|
|
12
12
|
return;
|
|
13
13
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ponyfillGlobal } from '@mui/utils';
|
|
2
2
|
export const getReleaseInfo = () => {
|
|
3
|
-
const releaseInfo = "
|
|
3
|
+
const releaseInfo = "MTczMTAyMDQwMDAwMA==";
|
|
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.22.
|
|
3
|
+
"version": "7.22.2",
|
|
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-data-grid": "7.22.2",
|
|
42
43
|
"@mui/x-internals": "7.21.0",
|
|
43
|
-
"@mui/x-license": "7.21.0"
|
|
44
|
-
"@mui/x-data-grid": "7.22.0"
|
|
44
|
+
"@mui/x-license": "7.21.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@emotion/react": "^11.9.0",
|
package/utils/releaseInfo.js
CHANGED
|
@@ -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 = "
|
|
9
|
+
const releaseInfo = "MTczMTAyMDQwMDAwMA==";
|
|
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
|