table icon indicating copy to clipboard operation
table copied to clipboard

fix: update col width when using cutomized body

Open knightf opened this issue 3 years ago • 2 comments

🤔 This is a ...

  • [x] Bug fix

🔗 Related issue link

https://github.com/ant-design/ant-design/issues/35562

💡 Background and solution

  1. extracted the logic of calculating sticky columns' width to a pure function for sharing
  2. imported this function in Table component to update the stickyOffsets value

📝 Changelog

Language Changelog
🇺🇸 English Fixed the table header issue when multiple columns are fixed in virtual rendering.
🇨🇳 Chinese 修复了虚拟渲染时多列固定的情况下表头错位的问题。

knightf avatar May 16 '22 08:05 knightf

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
table ✅ Ready (Inspect) Visit Preview May 16, 2022 at 8:04AM (UTC)

vercel[bot] avatar May 16 '22 08:05 vercel[bot]

Codecov Report

Merging #812 (26a8454) into master (7cb9401) will increase coverage by 0.00%. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #812   +/-   ##
=======================================
  Coverage   99.37%   99.38%           
=======================================
  Files          35       35           
  Lines         967      971    +4     
  Branches      293      293           
=======================================
+ Hits          961      965    +4     
  Misses          6        6           
Impacted Files Coverage Δ
src/Table.tsx 99.18% <100.00%> (+<0.01%) :arrow_up:
src/hooks/useStickyOffsets.ts 100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

codecov[bot] avatar Jun 06 '22 02:06 codecov[bot]