feat(cascader): support virtual scroll api#6117
Open
HaixingOoO wants to merge 7 commits intoTencent:developfrom
Open
feat(cascader): support virtual scroll api#6117HaixingOoO wants to merge 7 commits intoTencent:developfrom
HaixingOoO wants to merge 7 commits intoTencent:developfrom
Conversation
Collaborator
TDesign Component Site Preview Open
|
commit: |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds virtual scrolling support to the Cascader component to improve performance with large datasets. The implementation leverages the existing list component's virtual scroll hook and introduces a new scroll prop that accepts a TScroll configuration.
Key changes:
- Added
scrollprop to Cascader component type definitions and props - Refactored Panel component to use a new List component for rendering cascader items
- Created a new List component that implements virtual scrolling using the
useListVirtualScrollhook - Added example files demonstrating virtual scroll usage
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/components/cascader/type.ts | Added TScroll import and scroll prop type definition |
| packages/components/cascader/props.ts | Added scroll prop definition |
| packages/components/cascader/components/Panel.tsx | Refactored to use new List component instead of inline rendering |
| packages/components/cascader/components/List.tsx | New component implementing virtual scroll for cascader items |
| packages/components/cascader/cascader.tsx | Passed scroll prop to Panel component |
| packages/components/cascader/cascader.md | Added documentation for scroll prop (Chinese) |
| packages/components/cascader/cascader.en-US.md | Added documentation for scroll prop (English) |
| packages/components/cascader/cascader-panel.tsx | Passed scroll prop to Panel component |
| packages/components/cascader/_example/virtual-scroll.vue | Added example demonstrating virtual scroll usage |
| packages/components/cascader/_example-ts/virtual-scroll.vue | Added TypeScript example demonstrating virtual scroll usage |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Collaborator
|
/update-snapshot |
Contributor
|
⏳ 正在运行快照更新。。。 CI: Open |
Contributor
|
⏳ 正在运行快照更新。。。 CI: Open |
Collaborator
|
/update-common |
Collaborator
|
/update-snapshot |
Contributor
|
⏳ 正在运行快照更新。。。 CI: Open |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

🤔 这个 PR 的性质是?
🔗 相关 Issue
💡 需求背景和解决方案
support virtual scroll api
📝 更新日志
tdesign-vue-next
scrollAPI,支持懒加载和虚拟滚动。☑️ 请求合并前的自查清单