Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
noraleonte committed Feb 26, 2025
1 parent 4cf46d5 commit bb5d8f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/data/tree-view/rich-tree-view/editing/editing.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ apiRef.current.updateItemLabel(

## Editing lazy loaded children

In order to register changes for item labels on your server or update them in the cache use the `onItemLabelChange` callback function.
To store the updated item labels on your server use the `onItemLabelChange` callback function.

Changes to the label are not automatically updated in the `dataSourceCache` and will need to be updated manually.

Check warning on line 105 in docs/data/tree-view/rich-tree-view/editing/editing.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/tree-view/rich-tree-view/editing/editing.md", "range": {"start": {"line": 105, "column": 81}}}, "severity": "WARNING"}

```tsx
const handleItemLabelChange = (itemId: TreeViewItemId, newLabel: string) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ The `DataSourceCacheDefault` has a default Time To Live (`ttl`) of 5 minutes. To

## Lazy loading and label editing

In order to register changes for item labels on your server or update them in the cache use the `onItemLabelChange` callback function. The demo below shows you how to update the cache once a label is changed so the changes are reflected in the tree.
To store the updated item labels on your server use the `onItemLabelChange` callback function.

Changes to the label are not automatically updated in the `dataSourceCache` and will need to be updated manually. The demo below shows you how to update the cache once a label is changed so the changes are reflected in the tree.

Check warning on line 61 in docs/data/tree-view/rich-tree-view/lazy-loading/lazy-loading.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/tree-view/rich-tree-view/lazy-loading/lazy-loading.md", "range": {"start": {"line": 61, "column": 81}}}, "severity": "WARNING"}

{{"demo": "LazyLoadingAndLabelEditing.js"}}

0 comments on commit bb5d8f5

Please sign in to comment.