@mui/x-data-grid-premium 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 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
+ ![image](https://github.com/user-attachments/assets/4bc3a75b-74b8-4c6d-896b-5f5bf837bcda)
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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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` [![premium](https://mui.com/r/x-premium-svg)](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` [![pro](https://mui.com/r/x-pro-svg)](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_
@@ -50,7 +50,7 @@ const configuration = {
50
50
  useGridParamsOverridableMethods: _useGridParamsOverridableMethods.useGridParamsOverridableMethods
51
51
  }
52
52
  };
53
- const releaseInfo = "MTc2MjMwMDgwMDAwMA==";
53
+ const releaseInfo = "MTc2Mjk5MjAwMDAwMA==";
54
54
  const watermark = /*#__PURE__*/(0, _jsxRuntime.jsx)(_xLicense.Watermark, {
55
55
  packageName: "x-data-grid-premium",
56
56
  releaseInfo: releaseInfo
@@ -43,7 +43,7 @@ const configuration = {
43
43
  useGridParamsOverridableMethods
44
44
  }
45
45
  };
46
- const releaseInfo = "MTc2MjMwMDgwMDAwMA==";
46
+ const releaseInfo = "MTc2Mjk5MjAwMDAwMA==";
47
47
  const watermark = /*#__PURE__*/_jsx(Watermark, {
48
48
  packageName: "x-data-grid-premium",
49
49
  releaseInfo: releaseInfo
@@ -36,6 +36,9 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
36
36
  continue;
37
37
  }
38
38
  const row = rowLookup[rowId];
39
+ if (!row) {
40
+ continue;
41
+ }
39
42
  for (let j = 0; j < aggregatedFields.length; j += 1) {
40
43
  const aggregatedField = aggregatedFields[j];
41
44
  const columnAggregationRules = aggregationRules[aggregatedField];
@@ -51,9 +54,6 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
51
54
  // Since we know that pivoted fields are flat, we can use the row directly, and save lots of processing time
52
55
  value = row[field];
53
56
  } else {
54
- if (!row) {
55
- continue;
56
- }
57
57
  const valueGetter = valueGetters[aggregatedField];
58
58
  value = valueGetter(row);
59
59
  }
@@ -74,10 +74,7 @@ export const useGridAiAssistant = (apiRef, props) => {
74
74
  length: Math.min(DEFAULT_SAMPLE_COUNT, rows.length)
75
75
  }).map(() => {
76
76
  const row = rows[Math.floor(Math.random() * rows.length)];
77
- if (column.valueGetter) {
78
- return column.valueGetter(row[column.field], row, column, apiRef);
79
- }
80
- return row[column.field];
77
+ return apiRef.current.getRowValue(row, column);
81
78
  });
82
79
  });
83
80
  return columnExamples;
@@ -12,10 +12,20 @@ export const useGridParamsOverridableMethods = apiRef => {
12
12
  id: gridRowIdSelector(apiRef, row),
13
13
  field: colDef.field
14
14
  })?.value ?? communityMethods.getRowValue(row, colDef), [apiRef, communityMethods]);
15
- const getRowFormattedValue = React.useCallback((row, colDef) => gridCellAggregationResultSelector(apiRef, {
16
- id: gridRowIdSelector(apiRef, row),
17
- field: colDef.field
18
- })?.formattedValue ?? communityMethods.getRowFormattedValue(row, colDef), [apiRef, communityMethods]);
15
+ const getRowFormattedValue = React.useCallback((row, colDef) => {
16
+ const aggregationFormattedValue = gridCellAggregationResultSelector(apiRef, {
17
+ id: gridRowIdSelector(apiRef, row),
18
+ field: colDef.field
19
+ })?.formattedValue;
20
+ if (aggregationFormattedValue !== undefined) {
21
+ return aggregationFormattedValue;
22
+ }
23
+ const value = getRowValue(row, colDef);
24
+ if (!colDef || !colDef.valueFormatter) {
25
+ return value;
26
+ }
27
+ return colDef.valueFormatter(value, row, colDef, apiRef);
28
+ }, [apiRef, getRowValue]);
19
29
  return {
20
30
  getCellValue,
21
31
  getRowValue,
@@ -1,4 +1,3 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
- import { GridApiCommon } from '@mui/x-data-grid';
3
2
  import { GridApiPremium } from "../../models/gridApiPremium.js";
4
- export declare const useGridApiRef: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api | null>;
3
+ export declare const useGridApiRef: () => RefObject<GridApiPremium | null>;
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.17.0
2
+ * @mui/x-data-grid-premium v8.18.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -43,6 +43,9 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
43
43
  continue;
44
44
  }
45
45
  const row = rowLookup[rowId];
46
+ if (!row) {
47
+ continue;
48
+ }
46
49
  for (let j = 0; j < aggregatedFields.length; j += 1) {
47
50
  const aggregatedField = aggregatedFields[j];
48
51
  const columnAggregationRules = aggregationRules[aggregatedField];
@@ -58,9 +61,6 @@ const getGroupAggregatedValue = (groupId, apiRef, aggregationRowsScope, aggregat
58
61
  // Since we know that pivoted fields are flat, we can use the row directly, and save lots of processing time
59
62
  value = row[field];
60
63
  } else {
61
- if (!row) {
62
- continue;
63
- }
64
64
  const valueGetter = valueGetters[aggregatedField];
65
65
  value = valueGetter(row);
66
66
  }
@@ -82,10 +82,7 @@ const useGridAiAssistant = (apiRef, props) => {
82
82
  length: Math.min(DEFAULT_SAMPLE_COUNT, rows.length)
83
83
  }).map(() => {
84
84
  const row = rows[Math.floor(Math.random() * rows.length)];
85
- if (column.valueGetter) {
86
- return column.valueGetter(row[column.field], row, column, apiRef);
87
- }
88
- return row[column.field];
85
+ return apiRef.current.getRowValue(row, column);
89
86
  });
90
87
  });
91
88
  return columnExamples;
@@ -19,10 +19,20 @@ const useGridParamsOverridableMethods = apiRef => {
19
19
  id: (0, _xDataGridPro.gridRowIdSelector)(apiRef, row),
20
20
  field: colDef.field
21
21
  })?.value ?? communityMethods.getRowValue(row, colDef), [apiRef, communityMethods]);
22
- const getRowFormattedValue = React.useCallback((row, colDef) => (0, _gridAggregationSelectors.gridCellAggregationResultSelector)(apiRef, {
23
- id: (0, _xDataGridPro.gridRowIdSelector)(apiRef, row),
24
- field: colDef.field
25
- })?.formattedValue ?? communityMethods.getRowFormattedValue(row, colDef), [apiRef, communityMethods]);
22
+ const getRowFormattedValue = React.useCallback((row, colDef) => {
23
+ const aggregationFormattedValue = (0, _gridAggregationSelectors.gridCellAggregationResultSelector)(apiRef, {
24
+ id: (0, _xDataGridPro.gridRowIdSelector)(apiRef, row),
25
+ field: colDef.field
26
+ })?.formattedValue;
27
+ if (aggregationFormattedValue !== undefined) {
28
+ return aggregationFormattedValue;
29
+ }
30
+ const value = getRowValue(row, colDef);
31
+ if (!colDef || !colDef.valueFormatter) {
32
+ return value;
33
+ }
34
+ return colDef.valueFormatter(value, row, colDef, apiRef);
35
+ }, [apiRef, getRowValue]);
26
36
  return {
27
37
  getCellValue,
28
38
  getRowValue,
@@ -1,4 +1,3 @@
1
1
  import { RefObject } from '@mui/x-internals/types';
2
- import { GridApiCommon } from '@mui/x-data-grid';
3
2
  import { GridApiPremium } from "../../models/gridApiPremium.js";
4
- export declare const useGridApiRef: <Api extends GridApiCommon = GridApiPremium>() => RefObject<Api | null>;
3
+ export declare const useGridApiRef: () => RefObject<GridApiPremium | null>;
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-premium v8.17.0
2
+ * @mui/x-data-grid-premium v8.18.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-premium",
3
- "version": "8.17.0",
3
+ "version": "8.18.0",
4
4
  "author": "MUI Team",
5
5
  "description": "The Premium plan edition of the MUI X Data Grid Components.",
6
6
  "license": "SEE LICENSE IN LICENSE",
@@ -34,14 +34,14 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@babel/runtime": "^7.28.4",
37
- "@mui/utils": "^7.3.3",
38
- "@mui/x-internal-exceljs-fork": "^4.4.2",
37
+ "@mui/utils": "^7.3.5",
38
+ "@mui/x-internal-exceljs-fork": "^4.4.3",
39
39
  "clsx": "^2.1.1",
40
40
  "prop-types": "^15.8.1",
41
- "@mui/x-data-grid": "8.17.0",
42
- "@mui/x-data-grid-pro": "8.17.0",
43
- "@mui/x-internals": "8.17.0",
44
- "@mui/x-license": "8.17.0"
41
+ "@mui/x-internals": "8.18.0",
42
+ "@mui/x-data-grid": "8.18.0",
43
+ "@mui/x-license": "8.18.0",
44
+ "@mui/x-data-grid-pro": "8.18.0"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "@emotion/react": "^11.9.0",