@mui/x-data-grid 8.17.0 → 8.18.0
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 +100 -0
- package/components/cell/GridActionsCell.js +0 -2
- package/components/cell/GridActionsCellItem.js +0 -4
- package/esm/components/cell/GridActionsCell.js +0 -2
- package/esm/components/cell/GridActionsCellItem.js +0 -4
- package/esm/hooks/features/rows/gridRowSpanningUtils.js +8 -5
- package/esm/hooks/features/rows/useGridParamsApi.js +2 -12
- package/esm/hooks/utils/useGridApiRef.d.ts +1 -2
- package/esm/index.js +1 -1
- package/hooks/features/rows/gridRowSpanningUtils.js +8 -5
- package/hooks/features/rows/useGridParamsApi.js +2 -12
- package/hooks/utils/useGridApiRef.d.ts +1 -2
- package/index.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,106 @@
|
|
|
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.18.0
|
|
9
|
+
|
|
10
|
+
<!-- generated comparing v8.17.0..master -->
|
|
11
|
+
|
|
12
|
+
_Nov 13, 2025_
|
|
13
|
+
|
|
14
|
+
We'd like to extend a big thank you to the 14 contributors who made this release possible. Here are some highlights ✨:
|
|
15
|
+
|
|
16
|
+
- Add `barLabelPlacement` property to customize the bar label position in bar charts, enabling labels to be placed above bars.
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
- Add `source` property to the date/time picker lifecycle and event handler context, enabling clearer differentiation between changes initiated by the picker UI and those from direct field input.
|
|
21
|
+
- 🐞 Bugfixes
|
|
22
|
+
- 📚 Documentation improvements
|
|
23
|
+
|
|
24
|
+
Special thanks go out to these community members for their valuable contributions:
|
|
25
|
+
@htollefsen, @sai6855, @Sigdriv
|
|
26
|
+
|
|
27
|
+
The following team members contributed to this release:
|
|
28
|
+
@arminmeh, @bernardobelchior, @brijeshb42, @cherniavskii, @flaviendelangle, @JCQuintas, @michelengelen, @noraleonte, @prakhargupta1, @rita-codes, @siriwatknp
|
|
29
|
+
|
|
30
|
+
### Data Grid
|
|
31
|
+
|
|
32
|
+
#### `@mui/x-data-grid@8.18.0`
|
|
33
|
+
|
|
34
|
+
- [DataGrid] Allow default event in the column action cell item click event handler (#20272) @arminmeh
|
|
35
|
+
- [DataGrid] Remove unnecessary generic from `useGridApiRef` (#20277) @cherniavskii
|
|
36
|
+
|
|
37
|
+
#### `@mui/x-data-grid-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
38
|
+
|
|
39
|
+
Same changes as in `@mui/x-data-grid@8.18.0`.
|
|
40
|
+
|
|
41
|
+
#### `@mui/x-data-grid-premium@8.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
42
|
+
|
|
43
|
+
Same changes as in `@mui/x-data-grid-pro@8.18.0`, plus:
|
|
44
|
+
|
|
45
|
+
- [DataGridPremium] Return the correct `cellParams` value from the aggregation cells (#20224) @arminmeh
|
|
46
|
+
|
|
47
|
+
### Date and Time Pickers
|
|
48
|
+
|
|
49
|
+
#### `@mui/x-date-pickers@8.18.0`
|
|
50
|
+
|
|
51
|
+
- [pickers] Keep invalid date state consistent (#20040) @michelengelen
|
|
52
|
+
- [pickers] Adds new `source` property to `onChange` and `onAccept` context object (#20234) @michelengelen
|
|
53
|
+
|
|
54
|
+
#### `@mui/x-date-pickers-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
55
|
+
|
|
56
|
+
Same changes as in `@mui/x-date-pickers@8.18.0`.
|
|
57
|
+
|
|
58
|
+
### Charts
|
|
59
|
+
|
|
60
|
+
#### `@mui/x-charts@8.18.0`
|
|
61
|
+
|
|
62
|
+
- [charts] Add prop for positioning a bar label (#20194) @Sigdriv
|
|
63
|
+
- [charts] Fix applying dark mode styles in `ChartAxisZoomSliderThumb` (#20232) @sai6855
|
|
64
|
+
|
|
65
|
+
#### `@mui/x-charts-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
66
|
+
|
|
67
|
+
Same changes as in `@mui/x-charts@8.18.0`, plus:
|
|
68
|
+
|
|
69
|
+
- [charts-pro] Allow specifying Content Security Policy nonce on export (#20053) @bernardobelchior
|
|
70
|
+
- [charts-pro] Fix applying dark mode styles to slider (#20220) @sai6855
|
|
71
|
+
- [charts-pro] Sankey should respect node order (#20065) @JCQuintas
|
|
72
|
+
|
|
73
|
+
#### `@mui/x-charts-premium@8.18.0` [](https://mui.com/r/x-premium-svg-link 'Premium plan')
|
|
74
|
+
|
|
75
|
+
Same changes as in `@mui/x-charts-pro@8.18.0`.
|
|
76
|
+
|
|
77
|
+
### Tree View
|
|
78
|
+
|
|
79
|
+
#### `@mui/x-tree-view@8.18.0`
|
|
80
|
+
|
|
81
|
+
- [tree view] Prepare tests for the new store structure (#20225) @flaviendelangle
|
|
82
|
+
- [tree view] Prepare the item plugin files for the store migration (#20240) @flaviendelangle
|
|
83
|
+
- [tree view] Use `TreeItemId` type instead of raw string (#20233) @flaviendelangle
|
|
84
|
+
|
|
85
|
+
#### `@mui/x-tree-view-pro@8.18.0` [](https://mui.com/r/x-pro-svg-link 'Pro plan')
|
|
86
|
+
|
|
87
|
+
Same changes as in `@mui/x-tree-view@8.18.0`.
|
|
88
|
+
|
|
89
|
+
### Codemod
|
|
90
|
+
|
|
91
|
+
#### `@mui/x-codemod@8.18.0`
|
|
92
|
+
|
|
93
|
+
Internal changes.
|
|
94
|
+
|
|
95
|
+
### Docs
|
|
96
|
+
|
|
97
|
+
- [charts] Add a demo for a custom tick label (#20073) @prakhargupta1
|
|
98
|
+
- [charts] Create `useAxes()` hook documentation page (#20229) @JCQuintas
|
|
99
|
+
- [charts] Fix logo alignment (#20228) @JCQuintas
|
|
100
|
+
- [charts] Fixes typo in import example (#20236) @htollefsen
|
|
101
|
+
- [Data Grid] Add recipe for cursor pagination with data source (#19700) @siriwatknp
|
|
102
|
+
- [Data Grid] Add a demo for pinned rows aggregation (#20198) @cherniavskii
|
|
103
|
+
|
|
104
|
+
### Core
|
|
105
|
+
|
|
106
|
+
- [docs-infra] Use deployment config from docs-infra package (#20243) @brijeshb42
|
|
107
|
+
|
|
8
108
|
## 8.17.0
|
|
9
109
|
|
|
10
110
|
_Nov 5, 2025_
|
|
@@ -112,8 +112,6 @@ function GridActionsCell(props) {
|
|
|
112
112
|
touchRippleRefs.current[index] = instance;
|
|
113
113
|
};
|
|
114
114
|
const handleButtonClick = (index, onClick) => event => {
|
|
115
|
-
event.stopPropagation();
|
|
116
|
-
event.preventDefault();
|
|
117
115
|
setFocusedButtonIndex(index);
|
|
118
116
|
ignoreCallToFocus.current = true;
|
|
119
117
|
if (onClick) {
|
|
@@ -24,8 +24,6 @@ const GridActionsCellItem = exports.GridActionsCellItem = (0, _forwardRef.forwar
|
|
|
24
24
|
} = props,
|
|
25
25
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
|
|
26
26
|
const handleClick = event => {
|
|
27
|
-
event.stopPropagation();
|
|
28
|
-
event.preventDefault();
|
|
29
27
|
onClick?.(event);
|
|
30
28
|
};
|
|
31
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(rootProps.slots.baseIconButton, (0, _extends2.default)({
|
|
@@ -50,8 +48,6 @@ const GridActionsCellItem = exports.GridActionsCellItem = (0, _forwardRef.forwar
|
|
|
50
48
|
} = props,
|
|
51
49
|
other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded2);
|
|
52
50
|
const handleClick = event => {
|
|
53
|
-
event.stopPropagation();
|
|
54
|
-
event.preventDefault();
|
|
55
51
|
onClick?.(event);
|
|
56
52
|
if (closeMenuOnClick) {
|
|
57
53
|
closeMenu?.();
|
|
@@ -104,8 +104,6 @@ function GridActionsCell(props) {
|
|
|
104
104
|
touchRippleRefs.current[index] = instance;
|
|
105
105
|
};
|
|
106
106
|
const handleButtonClick = (index, onClick) => event => {
|
|
107
|
-
event.stopPropagation();
|
|
108
|
-
event.preventDefault();
|
|
109
107
|
setFocusedButtonIndex(index);
|
|
110
108
|
ignoreCallToFocus.current = true;
|
|
111
109
|
if (onClick) {
|
|
@@ -16,8 +16,6 @@ const GridActionsCellItem = forwardRef((props, ref) => {
|
|
|
16
16
|
} = props,
|
|
17
17
|
other = _objectWithoutPropertiesLoose(props, _excluded);
|
|
18
18
|
const handleClick = event => {
|
|
19
|
-
event.stopPropagation();
|
|
20
|
-
event.preventDefault();
|
|
21
19
|
onClick?.(event);
|
|
22
20
|
};
|
|
23
21
|
return /*#__PURE__*/_jsx(rootProps.slots.baseIconButton, _extends({
|
|
@@ -42,8 +40,6 @@ const GridActionsCellItem = forwardRef((props, ref) => {
|
|
|
42
40
|
} = props,
|
|
43
41
|
other = _objectWithoutPropertiesLoose(props, _excluded2);
|
|
44
42
|
const handleClick = event => {
|
|
45
|
-
event.stopPropagation();
|
|
46
|
-
event.preventDefault();
|
|
47
43
|
onClick?.(event);
|
|
48
44
|
if (closeMenuOnClick) {
|
|
49
45
|
closeMenu?.();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getRowValue } from "./gridRowsUtils.js";
|
|
1
2
|
export function getUnprocessedRange(testRange, processedRange) {
|
|
2
3
|
if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
|
|
3
4
|
return null;
|
|
@@ -33,10 +34,12 @@ export const getCellValue = (row, colDef, apiRef) => {
|
|
|
33
34
|
if (!row) {
|
|
34
35
|
return null;
|
|
35
36
|
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
cellValue = valueGetter(cellValue, row, colDef, apiRef);
|
|
37
|
+
const cellValue = row[colDef.field];
|
|
38
|
+
if (colDef.rowSpanValueGetter) {
|
|
39
|
+
return colDef.rowSpanValueGetter(cellValue, row, colDef, apiRef);
|
|
40
40
|
}
|
|
41
|
-
|
|
41
|
+
|
|
42
|
+
// This util is also called during the state initialization
|
|
43
|
+
// Use util method directly instead of calling apiRef.current.getRowValue
|
|
44
|
+
return getRowValue(row, colDef, apiRef);
|
|
42
45
|
};
|
|
@@ -40,18 +40,8 @@ export function useGridParamsApi(apiRef, props, configuration) {
|
|
|
40
40
|
value: forcedValue,
|
|
41
41
|
formattedValue: forcedFormattedValue
|
|
42
42
|
}) => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
value = forcedValue;
|
|
46
|
-
} else if (colDef?.valueGetter) {
|
|
47
|
-
value = colDef.valueGetter(value, row, colDef, apiRef);
|
|
48
|
-
}
|
|
49
|
-
let formattedValue = value;
|
|
50
|
-
if (forcedFormattedValue !== undefined) {
|
|
51
|
-
formattedValue = forcedFormattedValue;
|
|
52
|
-
} else if (colDef?.valueFormatter) {
|
|
53
|
-
formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);
|
|
54
|
-
}
|
|
43
|
+
const value = forcedValue !== undefined ? forcedValue : apiRef.current.getRowValue(row, colDef);
|
|
44
|
+
const formattedValue = forcedFormattedValue !== undefined ? forcedFormattedValue : apiRef.current.getRowFormattedValue(row, colDef);
|
|
55
45
|
const params = {
|
|
56
46
|
id,
|
|
57
47
|
field,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApiCommon } from "../../models/index.js";
|
|
3
2
|
import { GridApiCommunity } from "../../models/api/gridApiCommunity.js";
|
|
4
3
|
/**
|
|
5
4
|
* Hook that instantiate a [[GridApiRef]].
|
|
6
5
|
*/
|
|
7
|
-
export declare const useGridApiRef:
|
|
6
|
+
export declare const useGridApiRef: () => RefObject<GridApiCommunity | null>;
|
package/esm/index.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.getCellValue = void 0;
|
|
|
7
7
|
exports.getUnprocessedRange = getUnprocessedRange;
|
|
8
8
|
exports.isRowContextInitialized = isRowContextInitialized;
|
|
9
9
|
exports.isRowRangeUpdated = isRowRangeUpdated;
|
|
10
|
+
var _gridRowsUtils = require("./gridRowsUtils");
|
|
10
11
|
function getUnprocessedRange(testRange, processedRange) {
|
|
11
12
|
if (testRange.firstRowIndex >= processedRange.firstRowIndex && testRange.lastRowIndex <= processedRange.lastRowIndex) {
|
|
12
13
|
return null;
|
|
@@ -42,11 +43,13 @@ const getCellValue = (row, colDef, apiRef) => {
|
|
|
42
43
|
if (!row) {
|
|
43
44
|
return null;
|
|
44
45
|
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
cellValue = valueGetter(cellValue, row, colDef, apiRef);
|
|
46
|
+
const cellValue = row[colDef.field];
|
|
47
|
+
if (colDef.rowSpanValueGetter) {
|
|
48
|
+
return colDef.rowSpanValueGetter(cellValue, row, colDef, apiRef);
|
|
49
49
|
}
|
|
50
|
-
|
|
50
|
+
|
|
51
|
+
// This util is also called during the state initialization
|
|
52
|
+
// Use util method directly instead of calling apiRef.current.getRowValue
|
|
53
|
+
return (0, _gridRowsUtils.getRowValue)(row, colDef, apiRef);
|
|
51
54
|
};
|
|
52
55
|
exports.getCellValue = getCellValue;
|
|
@@ -49,18 +49,8 @@ function useGridParamsApi(apiRef, props, configuration) {
|
|
|
49
49
|
value: forcedValue,
|
|
50
50
|
formattedValue: forcedFormattedValue
|
|
51
51
|
}) => {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
value = forcedValue;
|
|
55
|
-
} else if (colDef?.valueGetter) {
|
|
56
|
-
value = colDef.valueGetter(value, row, colDef, apiRef);
|
|
57
|
-
}
|
|
58
|
-
let formattedValue = value;
|
|
59
|
-
if (forcedFormattedValue !== undefined) {
|
|
60
|
-
formattedValue = forcedFormattedValue;
|
|
61
|
-
} else if (colDef?.valueFormatter) {
|
|
62
|
-
formattedValue = colDef.valueFormatter(value, row, colDef, apiRef);
|
|
63
|
-
}
|
|
52
|
+
const value = forcedValue !== undefined ? forcedValue : apiRef.current.getRowValue(row, colDef);
|
|
53
|
+
const formattedValue = forcedFormattedValue !== undefined ? forcedFormattedValue : apiRef.current.getRowFormattedValue(row, colDef);
|
|
64
54
|
const params = {
|
|
65
55
|
id,
|
|
66
56
|
field,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { RefObject } from '@mui/x-internals/types';
|
|
2
|
-
import { GridApiCommon } from "../../models/index.js";
|
|
3
2
|
import { GridApiCommunity } from "../../models/api/gridApiCommunity.js";
|
|
4
3
|
/**
|
|
5
4
|
* Hook that instantiate a [[GridApiRef]].
|
|
6
5
|
*/
|
|
7
|
-
export declare const useGridApiRef:
|
|
6
|
+
export declare const useGridApiRef: () => RefObject<GridApiCommunity | null>;
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mui/x-data-grid",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.18.0",
|
|
4
4
|
"author": "MUI Team",
|
|
5
5
|
"description": "The Community plan edition of the MUI X Data Grid components.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@babel/runtime": "^7.28.4",
|
|
41
|
-
"@mui/utils": "^7.3.
|
|
41
|
+
"@mui/utils": "^7.3.5",
|
|
42
42
|
"clsx": "^2.1.1",
|
|
43
43
|
"prop-types": "^15.8.1",
|
|
44
44
|
"use-sync-external-store": "^1.6.0",
|
|
45
|
-
"@mui/x-internals": "8.
|
|
46
|
-
"@mui/x-virtualizer": "0.2.
|
|
45
|
+
"@mui/x-internals": "8.18.0",
|
|
46
|
+
"@mui/x-virtualizer": "0.2.8"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@emotion/react": "^11.9.0",
|