Skip to content

Commit

Permalink
fix a few more around the existing one fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 7, 2024
1 parent 726f820 commit 5628618
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,6 @@ No changes since `@mui/[email protected]`.
- [docs] Add a warning to promote the usage of `updateRows()` (#14027) @MBilalShafi
- [docs] Disable ad in `Rich Tree View-Ordering` page (#14123) @oliviertassinari
- [docs] Redesign Date and Time Pickers overview page (#13241) @noraleonte

- [CHANGELOG] Polish details @oliviertassinari
- [code-infra] Use concurrency 1 in CircleCI (#14110) @JCQuintas
- [infra] Re-added the removal of `Latest Version` section (#14132) @michelengelen
Expand Down
6 changes: 3 additions & 3 deletions changelogOld/CHANGELOG.v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -378,16 +378,16 @@ Big thanks to the 11 contributors who made this release possible. Here are some

- [DataGrid] Improve the editing API (#1955) @m4theushw

- The `props` key in the first argument of `commitCellChange` was removed to promote the use of the value already stored in the state.
To update the value in the state, call `setEditCellProps` before.
- The `props` key in the first argument of `commitCellChange()` was removed to promote the use of the value already stored in the state.
To update the value in the state, call `setEditCellProps()` before.

```diff
-apiRef.current.commitCellChange({ id: 1, field: 'name', props: { value: 'Ana' } });
+apiRef.current.setEditCellProps({ id: 1, field: 'name', props: { value: 'Ana' } });
+apiRef.current.commitCellChange({ id: 1, field: 'name' });
```

- Calling `commitCellChange` in a cell in view mode will throw an error. Make sure to first enter the edit mode.
- Calling `commitCellChange()` in a cell in view mode throws an error. Make sure to first enter the edit mode.

```diff
+apiRef.current.setCellMode(1, 'name', 'edit');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ Most of this breaking change is handled by `preset-safe` codemod but some furthe
+ const focusedField = props.focusedCell;
+ const tabIndex = props.tabbableCell === column.field ? 0 : 1;
```
- Updating the [`rows` prop](/x/react-data-grid/row-updates/#the-rows-prop) or calling `apiRef.current.setRows` will now remove the expansion state of the grid as these methods are meant to replace the rows.
- Updating the [`rows` prop](/x/react-data-grid/row-updates/#the-rows-prop) or calling `apiRef.current.setRows()` will now remove the expansion state of the grid as these methods are meant to replace the rows.

Check warning on line 300 in docs/data/migration/migration-data-grid-v5/migration-data-grid-v5.md

View workflow job for this annotation

GitHub Actions / runner / vale

[vale] reported by reviewdog 🐶 [Google.Will] Avoid using 'will'. Raw Output: {"message": "[Google.Will] Avoid using 'will'.", "location": {"path": "docs/data/migration/migration-data-grid-v5/migration-data-grid-v5.md", "range": {"start": {"line": 300, "column": 115}}}, "severity": "WARNING"}
For partial row updates, use the [`apiRef.current.updateRows()`](/x/react-data-grid/row-updates/#the-updaterows-method) method instead.

### Pagination
Expand Down

0 comments on commit 5628618

Please sign in to comment.