fix: virtualize dataframe page selector to fix "No matching page" bug#9178
Merged
kirangadhave merged 2 commits intomainfrom Apr 14, 2026
Merged
fix: virtualize dataframe page selector to fix "No matching page" bug#9178kirangadhave merged 2 commits intomainfrom
kirangadhave merged 2 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the dataframe page-selector “No matching page” behavior for large datasets by switching from clamped page ranges to a virtualized list and by implementing explicit prefix-based filtering for page numbers.
Changes:
- Replaced the clamped
getPageRangesapproach with a virtualized page list. - Disabled cmdk’s built-in filtering and implemented custom
startsWithnumeric filtering. - Removed the now-obsolete unit test for
getPageRanges.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| frontend/src/components/data-table/types.ts | Removes the PageRange type that was only used by the old clamped pagination implementation. |
| frontend/src/components/data-table/pagination.tsx | Reworks the page selector to use a virtualized list and custom search filtering. |
| frontend/src/components/data-table/tests/pagination.test.tsx | Deletes tests tied to the removed getPageRanges logic. |
Comments suppressed due to low confidence (1)
frontend/src/components/data-table/pagination.tsx:194
- The virtualizer assumes a fixed row height via
PAGE_ITEM_HEIGHT, but the renderedCommandItemrows don’t have an explicit height (andtext-xsoverrides the basetext-smsizing frommenuItemVariants). This makes the virtualization math fragile and can lead to scroll/position drift if the effective row height isn’t exactlyPAGE_ITEM_HEIGHT. Consider setting an explicit item height that matchesPAGE_ITEM_HEIGHT(e.g. via a fixedh-*class) or switch to measuring elements.
const PAGE_ITEM_HEIGHT = 32;
export const PageSelector = ({
currentPage,
totalPages,
onPageChange,
Light2Dark
approved these changes
Apr 14, 2026
Contributor
Author
we have search, so scrolling is not an issue imo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9177
prettifyRowColumnCountus use options object instead of multiple args (lint warning)Cause: getPageRanges only rendered 30 pages (first 10, middle 10, last 10) and cmdk's filter only matched those when searching.
Deleted obsolete clamping tests, added tests for
matchingPageRangesScreen.Recording.2026-04-13.at.2.43.46.PM.mov