feat(pagination): keep the pager visible while scrolling

The page buttons sat at the top of the grid and scrolled away, so paging
through a long list meant scrolling back up. Sticky at the scrollport top
with an opaque background; the table header now sticks below it via
--pag-h (measured after append, so a wrapped pager still lines up).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-22 11:22:50 +01:00
parent a1e028bfc5
commit 60cf26b259
2 changed files with 15 additions and 4 deletions
+6 -1
View File
@@ -2297,7 +2297,12 @@ function renderGrid() {
const pageList = list.slice(start, start + state.pageSize);
if (total > 10) {
grid.appendChild(renderPagination(total, totalPages));
const pag = renderPagination(total, totalPages);
grid.appendChild(pag);
// The table header sticks below the sticky pagination bar, not under it.
grid.style.setProperty('--pag-h', pag.offsetHeight + 'px');
} else {
grid.style.setProperty('--pag-h', '0px');
}
if (state.viewMode === 'table') {