Skip to content

fix(data-table): keep the last row clear of the horizontal scrollbar - #60

Merged
kirillDevPro merged 1 commit into
masterfrom
fix/data-table-h-scrollbar-gutter
Sep 3, 2026
Merged

fix(data-table): keep the last row clear of the horizontal scrollbar#60
kirillDevPro merged 1 commit into
masterfrom
fix/data-table-h-scrollbar-gutter

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

What & why

MoonDataTable draws its horizontal scrollbar as an absolute overlay pinned to the root's
bottom edge, while the rows container is pinned to that same edge. The track therefore paints
over the bottom of whichever row sits at the viewport bottom; mid-list the user scrolls past
it, but at the end of the scroll range the last row can never be moved out from under the track
and stays clipped.

The rows container now insets by the track's own thickness whenever the track is drawn, under
one shared predicate that both the overlay and the gutter call, so the two can never disagree
about when the gutter exists. The track thickness becomes a single constant instead of a
duplicated literal.

How to verify

Rendered-geometry tests pin both cases: rows end above the track when there is horizontal
overflow, and reach the root bottom when there is none. Checked by eye in MoonTerminal's
Report panel with the sibling override: the last row is fully visible at the end of the scroll
range.

MoonDataTable draws its horizontal scrollbar as an absolute overlay
pinned to the root's bottom edge, while the rows container is pinned
to that same edge. The track therefore paints over the bottom of
whichever row sits at the viewport bottom; mid-list the user scrolls
past it, but at the end of the scroll range the last row can never
be moved out from under the track and stays clipped.

The rows container now insets by the track's own thickness whenever
the track is drawn, under one shared predicate that both the overlay
and the gutter call, so the two can never disagree about when the
gutter exists. The track thickness becomes a single constant instead
of a duplicated literal. Rendered-geometry tests pin both cases: rows
end above the track when there is horizontal overflow, and reach the
root bottom when there is none.
@kirillDevPro
kirillDevPro merged commit 2277810 into master Sep 3, 2026
2 checks passed
@kirillDevPro
kirillDevPro deleted the fix/data-table-h-scrollbar-gutter branch September 3, 2026 18:22
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.

1 participant