Skip to content

Commit

Permalink
fix: tree data deep reactive, close #5480
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Apr 12, 2022
1 parent 6f8c75c commit 278478b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/vc-tree-select/hooks/useTreeData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function useTreeData(
rootPId: null,
...(simpleModeValue !== true ? simpleModeValue : {}),
})
: toRaw(treeData.value);
: toRaw(treeData.value).slice();
} else {
mergedTreeData.value = convertChildrenToData(toRaw(children.value));
}
Expand Down
2 changes: 1 addition & 1 deletion components/vc-tree/Tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export default defineComponent({
() => {
treeData.value =
props.treeData !== undefined
? toRaw(props.treeData)
? toRaw(props.treeData).slice()
: convertTreeToData(toRaw(props.children));
},
{ immediate: true, deep: true },
Expand Down

0 comments on commit 278478b

Please sign in to comment.