@mui/x-data-grid-generator 8.25.0 → 8.26.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,90 @@
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.26.0
9
+
10
+ _Jan 22, 2026_
11
+
12
+ We'd like to extend a big thank you to the 6 contributors who made this release possible. Here are some highlights ✨:
13
+
14
+ - 🔄 Data Grid now supports undo and redo actions. See the [Undo and redo](https://mui.com/x/react-data-grid/undo-redo/) page for details about out-of-the-box support and customization options.
15
+ - 🐞 Bugfixes
16
+
17
+ Special thanks go out to these community members for their valuable contributions:
18
+ @jhe-iqbis
19
+
20
+ The following team members contributed to this release:
21
+ @arminmeh, @cherniavskii, @flaviendelangle, @JCQuintas, @romgrk
22
+
23
+ ### Data Grid
24
+
25
+ #### `@mui/x-data-grid@8.26.0`
26
+
27
+ - [DataGrid] Add `onMenuOpen()` and `onMenuClose()` event handlers in `GridActionsCell` (#20994) @jhe-iqbis
28
+ - [DataGrid] Fix scroll position when virtualization is disabled (#20958) @romgrk
29
+
30
+ #### `@mui/x-data-grid-pro@8.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
31
+
32
+ Same changes as in `@mui/x-data-grid@8.26.0`.
33
+
34
+ #### `@mui/x-data-grid-premium@8.26.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
35
+
36
+ Same changes as in `@mui/x-data-grid-pro@8.26.0`, plus:
37
+
38
+ - [DataGridPremium] Undo and redo (#20993) @arminmeh
39
+
40
+ ### Date and Time Pickers
41
+
42
+ #### `@mui/x-date-pickers@8.26.0`
43
+
44
+ Internal changes.
45
+
46
+ #### `@mui/x-date-pickers-pro@8.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
47
+
48
+ Same changes as in `@mui/x-date-pickers@8.26.0`.
49
+
50
+ ### Charts
51
+
52
+ #### `@mui/x-charts@8.26.0`
53
+
54
+ Internal changes.
55
+
56
+ #### `@mui/x-charts-pro@8.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
57
+
58
+ Same changes as in `@mui/x-charts@8.26.0`.
59
+
60
+ #### `@mui/x-charts-premium@8.26.0` [![premium](https://mui.com/r/x-premium-svg)](https://mui.com/r/x-premium-svg-link 'Premium plan')
61
+
62
+ Same changes as in `@mui/x-charts-pro@8.26.0`.
63
+
64
+ ### Tree View
65
+
66
+ #### `@mui/x-tree-view@8.26.0`
67
+
68
+ - [tree view] Fix `props.id` not passed to the root element (#20976) @flaviendelangle
69
+
70
+ #### `@mui/x-tree-view-pro@8.26.0` [![pro](https://mui.com/r/x-pro-svg)](https://mui.com/r/x-pro-svg-link 'Pro plan')
71
+
72
+ Same changes as in `@mui/x-tree-view@8.26.0`.
73
+
74
+ ### Codemod
75
+
76
+ #### `@mui/x-codemod@8.26.0`
77
+
78
+ Internal changes.
79
+
80
+ ### Docs
81
+
82
+ - [docs] Recipe for lazy loading DataGrid's detail panels with auto height (#20995) @arminmeh
83
+
84
+ ### Core
85
+
86
+ - [code-infra] Update `master` to `v8` references (#20864) @JCQuintas
87
+ - [code-infra] Update v8 branch tags (#20926) @JCQuintas
88
+ - [code-infra] V8 changes in master (#20919) @JCQuintas
89
+ - [code-infra] Allow user to select target branch if it exists for current major (#21005) @JCQuintas
90
+ - [internal] Set up shared instructions for coding agents (#21000) @cherniavskii
91
+
8
92
  ## 8.25.0
9
93
 
10
94
  <!-- generated comparing v8.24.0..master -->
package/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v8.25.0
2
+ * @mui/x-data-grid-generator v8.26.0
3
3
  *
4
4
  * @license UNLICENSED
5
5
  * This source code is licensed under the UNLICENSED license found in the
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { useGridApiContext } from '@mui/x-data-grid-premium';
2
+ import { GridCellEditStopReasons, useGridApiContext } from '@mui/x-data-grid-premium';
3
3
  import Select from '@mui/material/Select';
4
4
  import MenuItem from '@mui/material/MenuItem';
5
5
  import ListItemIcon from '@mui/material/ListItemIcon';
@@ -14,22 +14,24 @@ function EditIncoterm(props) {
14
14
  } = props;
15
15
  const apiRef = useGridApiContext();
16
16
  const handleChange = async event => {
17
- await apiRef.current.setEditCellValue({
17
+ const isValid = await apiRef.current.setEditCellValue({
18
18
  id,
19
19
  field,
20
20
  value: event.target.value
21
21
  }, event);
22
- apiRef.current.stopCellEditMode({
23
- id,
24
- field
25
- });
22
+ if (isValid) {
23
+ const params = apiRef.current.getCellParams(id, field);
24
+ apiRef.current.publishEvent('cellEditStop', _extends({}, params, {
25
+ reason: GridCellEditStopReasons.enterKeyDown
26
+ }));
27
+ }
26
28
  };
27
29
  const handleClose = (event, reason) => {
28
30
  if (reason === 'backdropClick') {
29
- apiRef.current.stopCellEditMode({
30
- id,
31
- field
32
- });
31
+ const params = apiRef.current.getCellParams(id, field);
32
+ apiRef.current.publishEvent('cellEditStop', _extends({}, params, {
33
+ reason: GridCellEditStopReasons.cellFocusOut
34
+ }));
33
35
  }
34
36
  };
35
37
  return /*#__PURE__*/_jsx(Select, {
@@ -1,5 +1,5 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
- import { useGridApiContext, useGridRootProps, GridEditModes } from '@mui/x-data-grid-premium';
2
+ import { useGridApiContext, useGridRootProps, GridEditModes, GridCellEditStopReasons } from '@mui/x-data-grid-premium';
3
3
  import Select from '@mui/material/Select';
4
4
  import MenuItem from '@mui/material/MenuItem';
5
5
  import ListItemIcon from '@mui/material/ListItemIcon';
@@ -23,22 +23,20 @@ function EditStatus(props) {
23
23
  id,
24
24
  field,
25
25
  value: event.target.value
26
- });
26
+ }, event);
27
27
  if (isValid && rootProps.editMode === GridEditModes.Cell) {
28
- apiRef.current.stopCellEditMode({
29
- id,
30
- field,
31
- cellToFocusAfter: 'below'
32
- });
28
+ const params = apiRef.current.getCellParams(id, field);
29
+ apiRef.current.publishEvent('cellEditStop', _extends({}, params, {
30
+ reason: GridCellEditStopReasons.enterKeyDown
31
+ }));
33
32
  }
34
33
  };
35
34
  const handleClose = (event, reason) => {
36
35
  if (reason === 'backdropClick') {
37
- apiRef.current.stopCellEditMode({
38
- id,
39
- field,
40
- ignoreModifications: true
41
- });
36
+ const params = apiRef.current.getCellParams(id, field);
37
+ apiRef.current.publishEvent('cellEditStop', _extends({}, params, {
38
+ reason: GridCellEditStopReasons.cellFocusOut
39
+ }));
42
40
  }
43
41
  };
44
42
  return /*#__PURE__*/_jsx(Select, {
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-data-grid-generator v8.25.0
2
+ * @mui/x-data-grid-generator v8.26.0
3
3
  *
4
4
  * @license UNLICENSED
5
5
  * This source code is licensed under the UNLICENSED license found in the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mui/x-data-grid-generator",
3
- "version": "8.25.0",
3
+ "version": "8.26.0",
4
4
  "author": "MUI Team",
5
5
  "description": "Generate fake data for demo purposes only.",
6
6
  "license": "UNLICENSED",
@@ -25,10 +25,10 @@
25
25
  "chance": "^1.1.13",
26
26
  "clsx": "^2.1.1",
27
27
  "lru-cache": "^11.2.2",
28
- "@mui/x-data-grid": "8.25.0",
29
- "@mui/x-data-grid-premium": "8.25.0",
30
- "@mui/x-internals": "8.25.0",
31
- "@mui/x-data-grid-pro": "8.25.0"
28
+ "@mui/x-data-grid": "8.26.0",
29
+ "@mui/x-data-grid-premium": "8.26.0",
30
+ "@mui/x-internals": "8.26.0",
31
+ "@mui/x-data-grid-pro": "8.26.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@emotion/react": "^11.9.0",
@@ -21,22 +21,24 @@ function EditIncoterm(props) {
21
21
  } = props;
22
22
  const apiRef = (0, _xDataGridPremium.useGridApiContext)();
23
23
  const handleChange = async event => {
24
- await apiRef.current.setEditCellValue({
24
+ const isValid = await apiRef.current.setEditCellValue({
25
25
  id,
26
26
  field,
27
27
  value: event.target.value
28
28
  }, event);
29
- apiRef.current.stopCellEditMode({
30
- id,
31
- field
32
- });
29
+ if (isValid) {
30
+ const params = apiRef.current.getCellParams(id, field);
31
+ apiRef.current.publishEvent('cellEditStop', (0, _extends2.default)({}, params, {
32
+ reason: _xDataGridPremium.GridCellEditStopReasons.enterKeyDown
33
+ }));
34
+ }
33
35
  };
34
36
  const handleClose = (event, reason) => {
35
37
  if (reason === 'backdropClick') {
36
- apiRef.current.stopCellEditMode({
37
- id,
38
- field
39
- });
38
+ const params = apiRef.current.getCellParams(id, field);
39
+ apiRef.current.publishEvent('cellEditStop', (0, _extends2.default)({}, params, {
40
+ reason: _xDataGridPremium.GridCellEditStopReasons.cellFocusOut
41
+ }));
40
42
  }
41
43
  };
42
44
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {
@@ -30,22 +30,20 @@ function EditStatus(props) {
30
30
  id,
31
31
  field,
32
32
  value: event.target.value
33
- });
33
+ }, event);
34
34
  if (isValid && rootProps.editMode === _xDataGridPremium.GridEditModes.Cell) {
35
- apiRef.current.stopCellEditMode({
36
- id,
37
- field,
38
- cellToFocusAfter: 'below'
39
- });
35
+ const params = apiRef.current.getCellParams(id, field);
36
+ apiRef.current.publishEvent('cellEditStop', (0, _extends2.default)({}, params, {
37
+ reason: _xDataGridPremium.GridCellEditStopReasons.enterKeyDown
38
+ }));
40
39
  }
41
40
  };
42
41
  const handleClose = (event, reason) => {
43
42
  if (reason === 'backdropClick') {
44
- apiRef.current.stopCellEditMode({
45
- id,
46
- field,
47
- ignoreModifications: true
48
- });
43
+ const params = apiRef.current.getCellParams(id, field);
44
+ apiRef.current.publishEvent('cellEditStop', (0, _extends2.default)({}, params, {
45
+ reason: _xDataGridPremium.GridCellEditStopReasons.cellFocusOut
46
+ }));
49
47
  }
50
48
  };
51
49
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Select.default, {