Skip to content

Commit

Permalink
feat(Tree): support scrollTo and keys usage
Browse files Browse the repository at this point in the history
  • Loading branch information
uyarn committed Dec 31, 2024
1 parent 9495978 commit 99ab693
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 99ab693

Please sign in to comment.