Skip to content
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

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

kaine0923
Copy link
Contributor

@kaine0923 kaine0923 commented Aug 23, 2023

Please make sure these boxes are checked before submitting your PR, thank you!

  • Make sure you follow contributing guide English | (中文 | Español | Français).
  • Make sure you are merging your commits to dev branch.
  • Add some descriptions and refer to relative issues for your PR.

Description

expose scrollTo from FixedSizeList

🤖 Generated by Copilot at 4ad4807

This pull request adds a scrollTo feature to the tree component, which enables scrolling to a specific node in the virtual-list. It modifies the useTree composable, the tree.vue template, and the tree.test.ts file to implement and test this feature.

Related Issue

Fixes #___.

Explanation of Changes

🤖 Generated by Copilot at 4ad4807

  • Add scrollTo function to tree component that can scroll to a given node by its key (link, link, link, link)
  • Import and define listRef reference that holds the virtual-list component instance used by the tree component (link, link, link, link)
  • Add test case for scrollTo function in tree.test.ts (link)

@pull-request-triage
Copy link

👋 @kaine0923, thank you for contributing element-plus.

  • You can comment with /label Components:[component_name] to add a label for which component you are working on.
  • You may join our Discord for staying tuned.

@github-actions
Copy link

Hello @kaine0923, thank you for contributing to element-plus, please see our guideline to see how to make contribution

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

@github-actions
Copy link

github-actions bot commented Aug 23, 2023

🧪 Playground Preview: https://element-plus.run/?pr=14050
Please comment the example via this playground if needed.

@tolking
Copy link
Member

tolking commented Jul 31, 2024

@kaine0923 Can you first improve the relevant method documents?

@kaine0923
Copy link
Contributor Author

kaine0923 commented Jul 31, 2024

@kaine0923 Can you first improve the relevant method documents?

done

kaine0923 and others added 2 commits August 2, 2024 12:56
1. expose scrollTo from listRef

2. rename scrollTo to scrollToNode

3. add test

4. change docs
Copy link
Member

@tolking tolking left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@btea btea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants