fix(data-table): Header fixes#775
Conversation
`position: sticky` is bounded by its containing block. The sticky class was on the inner `VirtualHeaders` rowgroup, but the wrapping `<div ref={headerRef}>` (used for measurement) became the containing block and was only one header-row tall — so the header detached after ~one row of scroll.
Move `stickyHeader` onto the wrapper itself so its containing block becomes `.virtualTable` (full content height), restoring sticky behavior for the entire scroll range.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe pull request moves the Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |
…te border-collapse and bottom border
`.virtualSectionHeader` and `.stickyGroupAnchor` had no font-size rule and inherited the document default (~16px), while the non-virtualized variant renders group headers at small (~12px) via the `<table>` font cascade. Added font-size and line-height tokens to both so they match.
Bundles a few sticky-header / group-anchor fixes for
DataTable..stickySectionHeaderoffset was--rs-space-10(40px), but the column header renders at ~32px. Changed to--rs-space-8..stickyGroupAnchorwas taking flex-column flow space, so the natural first group header rendered separately. Added explicitheight+ negativemargin-bottomso it occupies zero flex space; the natural header lands behind it (covered viaz-index).border-collapse: collapse+ sticky<th>eats theborder-bottom. Locally overridden toborder-collapse: separate; border-spacing: 0forDataTable.Contentonly..virtualSectionHeaderand.stickyGroupAnchorhad no font-size rule and inherited the document default (~16px), while non-virtualized renders at small (~12px) via the<table>cascade. Addedfont-sizeandline-heighttokens to match.Test plan