@mui/x-data-grid 7.12.0 โ 7.12.1
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 +70 -2
- package/components/GridHeaders.js +1 -4
- package/hooks/core/useGridRefs.js +3 -1
- package/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/index.js +1 -1
- package/models/api/gridCoreApi.d.ts +1 -1
- package/modern/components/GridHeaders.js +1 -4
- package/modern/hooks/core/useGridRefs.js +3 -1
- package/modern/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/modern/index.js +1 -1
- package/node/components/GridHeaders.js +1 -4
- package/node/hooks/core/useGridRefs.js +3 -1
- package/node/hooks/features/rowSelection/useGridRowSelection.js +2 -3
- package/node/index.js +1 -1
- package/package.json +11 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,74 @@
|
|
|
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.12.1
|
|
7
|
+
|
|
8
|
+
_Aug 8, 2024_
|
|
9
|
+
|
|
10
|
+
We'd like to offer a big thanks to the 9 contributors who made this release possible. Here are some highlights โจ:
|
|
11
|
+
|
|
12
|
+
- ๐จ Charts get a new component to display color mapping in the legend
|
|
13
|
+
- ๐ The `@mui/x-charts-pro` is released in alpha version ๐งช. This new package introduces two main features:
|
|
14
|
+
- The Heatmap component
|
|
15
|
+
- The zoom interaction on the bar, line, and scatter charts
|
|
16
|
+
- ๐ Improve Dutch (nl-NL) locale on the Date and Time Pickers
|
|
17
|
+
- ๐ Bugfixes
|
|
18
|
+
|
|
19
|
+
<!--/ HIGHLIGHT_ABOVE_SEPARATOR /-->
|
|
20
|
+
|
|
21
|
+
### Data Grid
|
|
22
|
+
|
|
23
|
+
#### `@mui/x-data-grid@7.12.1`
|
|
24
|
+
|
|
25
|
+
- [DataGrid] Fix `checkboxSelectionVisibleOnly` behavior with server-side pagination (#14083) @MBilalShafi
|
|
26
|
+
- [DataGrid] Fix `columnHeadersContainerRef` being `undefined` before mount (#14051) @samwato
|
|
27
|
+
- [DataGrid] Support Yarn PnP (#14126) @cherniavskii
|
|
28
|
+
|
|
29
|
+
#### `@mui/x-data-grid-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
30
|
+
|
|
31
|
+
Same changes as in `@mui/x-data-grid@7.12.1`.
|
|
32
|
+
|
|
33
|
+
#### `@mui/x-data-grid-premium@7.12.1` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
34
|
+
|
|
35
|
+
Same changes as in `@mui/x-data-grid-pro@7.12.1`.
|
|
36
|
+
|
|
37
|
+
### Date and Time Pickers
|
|
38
|
+
|
|
39
|
+
#### `@mui/x-date-pickers@7.12.1`
|
|
40
|
+
|
|
41
|
+
- [l10n] Improve Dutch (nlNL) locale (pickers) (#14036) @Robin1896
|
|
42
|
+
|
|
43
|
+
#### `@mui/x-date-pickers-pro@7.12.1` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
44
|
+
|
|
45
|
+
Same changes as in `@mui/x-date-pickers@7.12.1`.
|
|
46
|
+
|
|
47
|
+
### Charts
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-charts@7.12.1`
|
|
50
|
+
|
|
51
|
+
- [charts] Fix charts vendor publish config (#14073) @JCQuintas
|
|
52
|
+
- [charts] Move `plugins` to `PluginProvider` (#14056) @JCQuintas
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-charts-pro@7.0.0-alpha.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-charts@7.12.1`, plus:
|
|
57
|
+
|
|
58
|
+
- [charts-pro] Release the pro package in alpha (#13859) @alexfauquette
|
|
59
|
+
|
|
60
|
+
### Tree View
|
|
61
|
+
|
|
62
|
+
#### `@mui/x-tree-view@7.12.1`
|
|
63
|
+
|
|
64
|
+
### Docs
|
|
65
|
+
|
|
66
|
+
- [docs] Add a warning to promote the usage of `updateRows` (#14027) @MBilalShafi
|
|
67
|
+
- [docs] Disable ad in `Rich Tree View-Ordering` page (#14123) @oliviertassinari
|
|
68
|
+
- [docs] Redesign Date and Time Pickers overview page (#13241) @noraleonte
|
|
69
|
+
|
|
70
|
+
- [CHANGELOG] Polish details @oliviertassinari
|
|
71
|
+
- [code-infra] Use concurrency 1 in CircleCI (#14110) @JCQuintas
|
|
72
|
+
- [infra] Re-added the removal of `Latest Version` section (#14132) @michelengelen
|
|
73
|
+
|
|
6
74
|
## 7.12.0
|
|
7
75
|
|
|
8
76
|
_Aug 1, 2024_
|
|
@@ -24,9 +92,9 @@ We'd like to offer a big thanks to the 12 contributors who made this release pos
|
|
|
24
92
|
|
|
25
93
|
- ๐ Introduce [item reordering using drag and drop](https://mui.com/x/react-tree-view/rich-tree-view/ordering/) on the `RichTreeViewPro` component
|
|
26
94
|
|
|
27
|
-
<img width="
|
|
95
|
+
<img width="287" src="https://github.com/user-attachments/assets/78bd83c5-7ce4-4ed7-acf9-be70b2dbce54" alt="Item reordering using drag and drop" />
|
|
28
96
|
|
|
29
|
-
- ๐ฆ Support
|
|
97
|
+
- ๐ฆ Support CommonJS bundle out of the box on `@mui/x-charts` by adding vendored D3 dependencies.
|
|
30
98
|
|
|
31
99
|
- This modifies how the package imports D3.js. It will impact you if you use `d3` packages installed by `@mui/x-charts` and don't have them in your `package.json`. You shouldn't be affected otherwise.
|
|
32
100
|
- For more context, the initial issue is caused by D3 only exporting ESM.
|
|
@@ -27,10 +27,7 @@ function GridHeaders() {
|
|
|
27
27
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
28
28
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
29
29
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
30
|
-
const columnsContainerRef =
|
|
31
|
-
apiRef.current.register('private', {
|
|
32
|
-
columnHeadersContainerRef: columnsContainerRef
|
|
33
|
-
});
|
|
30
|
+
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
34
31
|
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
35
32
|
ref: columnsContainerRef,
|
|
36
33
|
visibleColumns: visibleColumns,
|
|
@@ -3,11 +3,13 @@ export const useGridRefs = apiRef => {
|
|
|
3
3
|
const rootElementRef = React.useRef(null);
|
|
4
4
|
const mainElementRef = React.useRef(null);
|
|
5
5
|
const virtualScrollerRef = React.useRef(null);
|
|
6
|
+
const columnHeadersContainerRef = React.useRef(null);
|
|
6
7
|
apiRef.current.register('public', {
|
|
7
8
|
rootElementRef
|
|
8
9
|
});
|
|
9
10
|
apiRef.current.register('private', {
|
|
10
11
|
mainElementRef,
|
|
11
|
-
virtualScrollerRef
|
|
12
|
+
virtualScrollerRef,
|
|
13
|
+
columnHeadersContainerRef
|
|
12
14
|
});
|
|
13
15
|
};
|
|
@@ -272,11 +272,10 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
272
272
|
}
|
|
273
273
|
}, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
|
|
274
274
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
275
|
-
const
|
|
276
|
-
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
275
|
+
const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
277
276
|
const filterModel = gridFilterModelSelector(apiRef);
|
|
278
277
|
apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);
|
|
279
|
-
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
278
|
+
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
|
|
280
279
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
281
280
|
// Get the most recent cell mode because it may have been changed by another listener
|
|
282
281
|
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
|
package/index.js
CHANGED
|
@@ -67,7 +67,7 @@ export interface GridCorePrivateApi<GridPublicApi extends GridApiCommon, GridPri
|
|
|
67
67
|
/**
|
|
68
68
|
* The React ref of the grid column container virtualized div element.
|
|
69
69
|
*/
|
|
70
|
-
columnHeadersContainerRef
|
|
70
|
+
columnHeadersContainerRef: React.RefObject<HTMLDivElement>;
|
|
71
71
|
/**
|
|
72
72
|
* The React ref of the grid header filter row element.
|
|
73
73
|
*/
|
|
@@ -27,10 +27,7 @@ function GridHeaders() {
|
|
|
27
27
|
const columnVisibility = useGridSelector(apiRef, gridColumnVisibilityModelSelector);
|
|
28
28
|
const columnGroupsHeaderStructure = useGridSelector(apiRef, gridColumnGroupsHeaderStructureSelector);
|
|
29
29
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
30
|
-
const columnsContainerRef =
|
|
31
|
-
apiRef.current.register('private', {
|
|
32
|
-
columnHeadersContainerRef: columnsContainerRef
|
|
33
|
-
});
|
|
30
|
+
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
34
31
|
return /*#__PURE__*/_jsx(rootProps.slots.columnHeaders, _extends({
|
|
35
32
|
ref: columnsContainerRef,
|
|
36
33
|
visibleColumns: visibleColumns,
|
|
@@ -3,11 +3,13 @@ export const useGridRefs = apiRef => {
|
|
|
3
3
|
const rootElementRef = React.useRef(null);
|
|
4
4
|
const mainElementRef = React.useRef(null);
|
|
5
5
|
const virtualScrollerRef = React.useRef(null);
|
|
6
|
+
const columnHeadersContainerRef = React.useRef(null);
|
|
6
7
|
apiRef.current.register('public', {
|
|
7
8
|
rootElementRef
|
|
8
9
|
});
|
|
9
10
|
apiRef.current.register('private', {
|
|
10
11
|
mainElementRef,
|
|
11
|
-
virtualScrollerRef
|
|
12
|
+
virtualScrollerRef,
|
|
13
|
+
columnHeadersContainerRef
|
|
12
14
|
});
|
|
13
15
|
};
|
|
@@ -272,11 +272,10 @@ export const useGridRowSelection = (apiRef, props) => {
|
|
|
272
272
|
}
|
|
273
273
|
}, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
|
|
274
274
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
275
|
-
const
|
|
276
|
-
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
275
|
+
const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? gridPaginatedVisibleSortedGridRowIdsSelector(apiRef) : gridExpandedSortedRowIdsSelector(apiRef);
|
|
277
276
|
const filterModel = gridFilterModelSelector(apiRef);
|
|
278
277
|
apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);
|
|
279
|
-
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
278
|
+
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
|
|
280
279
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
281
280
|
// Get the most recent cell mode because it may have been changed by another listener
|
|
282
281
|
if (apiRef.current.getCellMode(params.id, params.field) === GridCellModes.Edit) {
|
package/modern/index.js
CHANGED
|
@@ -36,10 +36,7 @@ function GridHeaders() {
|
|
|
36
36
|
const columnVisibility = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnsSelector.gridColumnVisibilityModelSelector);
|
|
37
37
|
const columnGroupsHeaderStructure = (0, _useGridSelector.useGridSelector)(apiRef, _gridColumnGroupsSelector.gridColumnGroupsHeaderStructureSelector);
|
|
38
38
|
const hasOtherElementInTabSequence = !(columnGroupHeaderTabIndexState === null && columnHeaderTabIndexState === null && cellTabIndexState === null);
|
|
39
|
-
const columnsContainerRef =
|
|
40
|
-
apiRef.current.register('private', {
|
|
41
|
-
columnHeadersContainerRef: columnsContainerRef
|
|
42
|
-
});
|
|
39
|
+
const columnsContainerRef = apiRef.current.columnHeadersContainerRef;
|
|
43
40
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.columnHeaders, (0, _extends2.default)({
|
|
44
41
|
ref: columnsContainerRef,
|
|
45
42
|
visibleColumns: visibleColumns,
|
|
@@ -11,12 +11,14 @@ const useGridRefs = apiRef => {
|
|
|
11
11
|
const rootElementRef = React.useRef(null);
|
|
12
12
|
const mainElementRef = React.useRef(null);
|
|
13
13
|
const virtualScrollerRef = React.useRef(null);
|
|
14
|
+
const columnHeadersContainerRef = React.useRef(null);
|
|
14
15
|
apiRef.current.register('public', {
|
|
15
16
|
rootElementRef
|
|
16
17
|
});
|
|
17
18
|
apiRef.current.register('private', {
|
|
18
19
|
mainElementRef,
|
|
19
|
-
virtualScrollerRef
|
|
20
|
+
virtualScrollerRef,
|
|
21
|
+
columnHeadersContainerRef
|
|
20
22
|
});
|
|
21
23
|
};
|
|
22
24
|
exports.useGridRefs = useGridRefs;
|
|
@@ -282,11 +282,10 @@ const useGridRowSelection = (apiRef, props) => {
|
|
|
282
282
|
}
|
|
283
283
|
}, [apiRef, expandMouseRowRangeSelection, canHaveMultipleSelection]);
|
|
284
284
|
const handleHeaderSelectionCheckboxChange = React.useCallback(params => {
|
|
285
|
-
const
|
|
286
|
-
const rowsToBeSelected = shouldLimitSelectionToCurrentPage ? (0, _pagination.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef) : (0, _gridFilterSelector.gridExpandedSortedRowIdsSelector)(apiRef);
|
|
285
|
+
const rowsToBeSelected = props.pagination && props.checkboxSelectionVisibleOnly && props.paginationMode === 'client' ? (0, _pagination.gridPaginatedVisibleSortedGridRowIdsSelector)(apiRef) : (0, _gridFilterSelector.gridExpandedSortedRowIdsSelector)(apiRef);
|
|
287
286
|
const filterModel = (0, _gridFilterSelector.gridFilterModelSelector)(apiRef);
|
|
288
287
|
apiRef.current.selectRows(rowsToBeSelected, params.value, filterModel?.items.length > 0);
|
|
289
|
-
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination]);
|
|
288
|
+
}, [apiRef, props.checkboxSelectionVisibleOnly, props.pagination, props.paginationMode]);
|
|
290
289
|
const handleCellKeyDown = React.useCallback((params, event) => {
|
|
291
290
|
// Get the most recent cell mode because it may have been changed by another listener
|
|
292
291
|
if (apiRef.current.getCellMode(params.id, params.field) === _gridEditRowModel.GridCellModes.Edit) {
|
package/node/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "7.12.
|
|
3
|
+
"version": "7.12.1",
|
|
4
4
|
"description": "The Community plan edition of the Data Grid components (MUI X).",
|
|
5
5
|
"author": "MUI Team",
|
|
6
6
|
"main": "./node/index.js",
|
|
@@ -46,10 +46,20 @@
|
|
|
46
46
|
"@mui/x-internals": "7.12.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
+
"@emotion/react": "^11.9.0",
|
|
50
|
+
"@emotion/styled": "^11.8.1",
|
|
49
51
|
"@mui/material": "^5.15.14",
|
|
50
52
|
"react": "^17.0.0 || ^18.0.0",
|
|
51
53
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
52
54
|
},
|
|
55
|
+
"peerDependenciesMeta": {
|
|
56
|
+
"@emotion/react": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
59
|
+
"@emotion/styled": {
|
|
60
|
+
"optional": true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
53
63
|
"engines": {
|
|
54
64
|
"node": ">=14.0.0"
|
|
55
65
|
},
|