Conversation
|
@Soumya95 is attempting to deploy a commit to the afc163's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. Walkthrough固定表头不再接收 Changes固定表头宽度处理
Priority: ⬇️ Low Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Merge Risk: ⚪ Minimal · up to The fixed-header column-width behavior and its empty-data and measured-width cases are covered without any identified merge-blocking risk. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 小兔挥耳看列组, Comment |
Problem
When
scroll.yis enabled,FixedHolderrenders a trailing scrollbar<th>in the header, and the body scroll container reserves ~15px for the native vertical scrollbar. But the header<colgroup>did not consistently include the matching trailing<col>:noData), or when no measured widths existed,FixedHolderfell back to renderingbodyColGroup— a<ColGroup>built from declared widths only, without the scrollbar column.ColGroupskips trailing columns that carry no width/attrs, that path could even render no<colgroup>at all.Net effect: the header's scrollbar
<th>had no corresponding<col>, so undertable-layout: fixedthe header cells shrank / diverged from the body cells → misaligned header vs. body withscroll.y, plus a visible "jump" when the first data rows arrived (empty vs. filled data rendered different colgroups).Fix
src/FixedHolder/index.tsxnow always renders the inline<ColGroup>and always appends the scrollbar column width:flattenColumns, andcombinationScrollBarSizeas the trailing placeholder.This makes the empty-data and filled-data renderings identical (stable, non-jumping header) and guarantees every header cell — including the trailing
rc-table-cell-scrollbar<th>— has a matching<col>.noData/colGroupprops (used only to feed the old fallback) were removed fromTable.tsx.Tests
tests/Scroll.spec.jsx: new regression tests assertingcolumns.length + 1header cols with a trailing15pxscrollbar col, andFixedColumn.spec.tsx,Table.spec.jsx).Full suite: 238/238 tests pass;
tsc --noEmitclean.Summary by CodeRabbit
Bug 修复
测试