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

fix: Table virtual with narrow columns #44818

Merged
merged 6 commits into from
Sep 13, 2023
Merged

fix: Table virtual with narrow columns #44818

merged 6 commits into from
Sep 13, 2023

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 13, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

fix #44785
fix #44823

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Table with virtual display issue about columns less than table size and some border & hover style missing.
🇨🇳 Chinese 修复 Table virtual 开启虚拟滚动时,当 columns 小于表格宽度会显示异常的问题以及部分边框、悬浮样式丢失的问题。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖 Generated by Copilot at 865f3b6

This pull request enhances the table component with a virtual table feature, which allows rendering large data sets efficiently. It adds a new demo, a custom hook, a style file, and a test case for the feature. It also updates the rc-table dependency to the latest version.

🔍 Walkthrough

🤖 Generated by Copilot at 865f3b6

  • Add virtual table feature to table component (link, link, link, link, link, link, link, link, link, link, link, link, link)
  • Import and use custom hook useContainerWidth to calculate table container width (link, link, link)
  • Pass getContainerWidth function as prop to rc-table component (link, link)
  • Update test case to expect warning message about scroll.y (link)
  • Add demo file virtual-list.tsx to showcase virtual table feature (link, link, link, link, link)
    • Import and use Segmented component to select data row count (link, link)
    • Rename columns variable to fixedColumns to indicate fixed mode (link)
    • Replace hard-coded data array with getData function call (link)
    • Add switch component to toggle fixed mode (link)
  • Add file virtual.ts to export CSS rules for virtual table feature (link, link)
    • Add border styles for empty placeholder element (link)

@stackblitz
Copy link

stackblitz bot commented Sep 13, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

@socket-security
Copy link

Removed dependencies detected. Learn more about Socket for GitHub ↗︎

🚮 Removed packages: rc-table@7.33.4

@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 393.78 KB (+186 B 🔺)
./dist/antd-with-locales.min.js 452.96 KB (+204 B 🔺)

@argos-ci
Copy link

argos-ci bot commented Sep 13, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Sep 13, 2023, 9:35 AM

@codecov
Copy link

codecov bot commented Sep 13, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (9ec402c) 100.00% compared to head (eeb31a4) 100.00%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #44818   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          681       682    +1     
  Lines        11526     11567   +41     
  Branches      3103      3104    +1     
=========================================
+ Hits         11526     11567   +41     
Files Changed Coverage Δ
components/card/style/index.ts 100.00% <ø> (ø)
components/table/style/index.ts 100.00% <ø> (ø)
components/table/style/selection.ts 100.00% <ø> (ø)
components/table/InternalTable.tsx 100.00% <100.00%> (ø)
components/table/hooks/useContainerWidth.ts 100.00% <100.00%> (ø)
components/table/style/virtual.ts 100.00% <100.00%> (ø)

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zombieJ zombieJ merged commit 2387091 into master Sep 13, 2023
88 checks passed
@zombieJ zombieJ deleted the fix-resize branch September 13, 2023 09:53
@MadCcc MadCcc mentioned this pull request Sep 15, 2023
20 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants