Skip to content

Commit

Permalink
feat(Tree): support scrollTo and keys usage (#4880)
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn authored Dec 31, 2024
1 parent 5306c99 commit 60c6f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tree/hooks/useTreeScroll.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export default function useTreeScroll(state: TypeTreeState) {
return;
}
index = allNodes.value?.findIndex((item) =>
[get(item.data, 'key'), get(item.data, 'value')].includes(params.key),
[get(item.data, 'key'), get(item.data, props.keys?.['value'] || 'value')].includes(params.key),
);
if (index < 0) {
log.error('Tree', `${params.key} does not exist in data, check \`key\` or \`data\` please.`);
Expand Down

0 comments on commit 60c6f66

Please sign in to comment.