-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(components): [tree-v2] add scrollTo method #14050
Conversation
👋 @kaine0923, thank you for contributing element-plus. |
Hello @kaine0923, thank you for contributing to element-plus, please see our guideline to see how to make contribution |
🧪 Playground Preview: https://element-plus.run/?pr=14050 |
@kaine0923 Can you first improve the relevant method documents? |
done |
1. expose scrollTo from listRef 2. rename scrollTo to scrollToNode 3. add test 4. change docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Please make sure these boxes are checked before submitting your PR, thank you!
dev
branch.Description
expose
scrollTo
fromFixedSizeList
🤖 Generated by Copilot at 4ad4807
This pull request adds a
scrollTo
feature to thetree
component, which enables scrolling to a specific node in the virtual-list. It modifies theuseTree
composable, thetree.vue
template, and thetree.test.ts
file to implement and test this feature.Related Issue
Fixes #___.
Explanation of Changes
🤖 Generated by Copilot at 4ad4807
scrollTo
function to tree component that can scroll to a given node by its key (link, link, link, link)listRef
reference that holds the virtual-list component instance used by the tree component (link, link, link, link)scrollTo
function intree.test.ts
(link)