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: Table support virtual
#44349
feat: Table support virtual
#44349
Conversation
Run & review this pull request in StackBlitz Codeflow. |
size-limit report 📦
|
请教为啥 |
因为本质上还是通过 |
Removed dependencies detected. Learn more about Socket for GitHub ↗︎ 🚮 Removed packages: @types/react-window@1.8.5, react-window@1.8.9 |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #44349 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 668 670 +2
Lines 11325 11349 +24
Branches 3062 3067 +5
=========================================
+ Hits 11325 11349 +24
☔ View full report in Codecov by Sentry. |
那既然是分开的, 能做到没有 |
那 API 上就会比较麻烦,index 里变成 |
virtual
virtual
virtual再加上表格的行合并,样式就错乱了,有更新计划吗?动态生成的dom中rowspan属性都没有携带,本地没办法handle |
[中文版模板 / Chinese template]
🤔 This is a ...
👀 Preview
https://preview-44349-ant-design.surge.sh/components/table-cn#components-table-demo-virtual-list
🔗 Related issue link
💡 Background and solution
📝 Changelog
virtual
props.virtual
属性开启虚拟滚动。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at e77224e
This pull request adds virtual scrolling support to the
Table
component using theRcVirtualTable
component from therc-table
library. It also updates the documentation, the demo, and the styles for theTable
component to reflect this new feature. Additionally, it renames theRcTable.tsx
file toindex.tsx
and demonstrates a tooltip bug with virtual scrolling.🔍 Walkthrough
🤖 Generated by Copilot at e77224e
RcVirtualTable
component fromRcTable
subdirectory and use it conditionally based onvirtual
prop inInternalTable.tsx
(link,link,link,link)virtual
prop toTableProps
interface and pass it toInternalTable
component inInternalTable.tsx
(link,link)useToken
hook to get theme token object and calculatelistItemHeight
based on table size inInternalTable.tsx
(link,link)renderTimes
prop toRcVirtualTable
component and use customshouldUpdate
function to trigger update when data or columns change inVirtualTable.tsx
(link)genVirtualStyle
function fromvirtual.ts
and call it ingenTableStyle
function inindex.ts
(link,link)genSizeStyle
function insize.ts
andindex.ts
(link,link)genVirtualStyle
function that generates CSS object for virtual table styles invirtual.ts
(link)rc-table
library inpackage.json
(link)virtual-list.md
(link)virtual
prop andInternalTable
component invirtual-list.tsx
(link)index.en-US.md
andindex.zh-CN.md
(link,link)basic.tsx
(link)