Skip to content

measure and use the header height in calculations#363

Merged
severo merged 2 commits intomasterfrom
set-header-height
Dec 22, 2025
Merged

measure and use the header height in calculations#363
severo merged 2 commits intomasterfrom
set-header-height

Conversation

@severo
Copy link
Copy Markdown
Contributor

@severo severo commented Dec 22, 2025

It fixes a bug when navigating with the keyboard.

Before, the current cell was hidden by the header

Screencast.From.2025-12-22.15-59-55.mp4

Now, it's visible

Screencast.From.2025-12-22.16-00-20.mp4

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a keyboard navigation bug where the currently focused cell was hidden behind the header. The fix measures the actual header height and uses it in scroll calculations to ensure proper cell visibility.

Key changes:

  • Refactored setTableCornerWidth to setTableCornerSize to track both width and height of the table corner
  • Added headerHeight calculation in Wrapper component using the measured table corner height
  • Updated scroll height calculation in Scroller to account for the actual header height

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
src/components/TableCorner/TableCorner.tsx Changed callback from setTableCornerWidth to setTableCornerSize to measure both width and height of the table corner element
src/components/HighTable/Wrapper.tsx Updated state to track full table corner size, calculated headerHeight from measured dimensions, and passed it to child components
src/components/HighTable/Slice.tsx Updated prop type to accept setTableCornerSize instead of setTableCornerWidth
src/components/HighTable/Scroller.tsx Added headerHeight prop and updated scroll height calculation to use it, ensuring accurate positioning when scrolling to cells

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/TableCorner/TableCorner.tsx Outdated
Comment thread src/components/TableCorner/TableCorner.tsx Outdated
@severo severo merged commit 08bcf94 into master Dec 22, 2025
5 checks passed
@severo severo deleted the set-header-height branch December 22, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants