feat(VirtualSelectList): add virtualized list for Select/Menu dropdowns - #43
Open
stefanonardo wants to merge 1 commit into
Open
feat(VirtualSelectList): add virtualized list for Select/Menu dropdowns#43stefanonardo wants to merge 1 commit into
stefanonardo wants to merge 1 commit into
Conversation
Add VirtualSelectList, a virtualized replacement for PatternFly's SelectList that renders only visible items in a scrollable dropdown. This enables Select menus with thousands of options without DOM performance degradation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
stefanonardo
force-pushed
the
add-virtual-select-list
branch
from
May 15, 2026 13:46
d666c71 to
982696e
Compare
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.
Issue #44
Summary
VirtualSelectList, a virtualized replacement for PatternFly'sSelectListthat renders only visible items in a scrollable dropdown, enabling Select menus with thousands of options without DOM performance degradationinnerScrollContainerClassNameprop toVirtualGridso non-table consumers can override the hardcodedpf-v6-c-table__tbodyclassMotivation
In OpenShift Console PR #16252, the Search page Resources dropdown has 1000+ items. After algorithmic optimizations (O(n²) → O(1) lookups, memoization), the remaining bottleneck is PatternFly's
Selectcomponent measuring DOM geometry (refCallbackforced reflow) after inserting all items. Even capped at 100 items, INP is 270ms ("needs improvement" on Core Web Vitals).VirtualSelectListreduces INP from 270ms → 107ms ("good"), a 60% further reduction by rendering only ~10-20 visible items instead of 100.Usage
Drop-in replacement for
<SelectList>inside a composable<Select>:Design decisions
VirtualGridwith 1 column, N rows — mirrorsVirtualTableBodypattern<ul role="listbox">as outer container viascrollContainerComponentrowRenderercallback (not children) — required for lazy virtualized rendering, matchesVirtualTableBody.rowRenderernamingscrollToRowVirtualTableBody's class component)Known limitations
popperProps={{ minWidth: '...' }}on the<Select><SelectGroup>support is a follow-upTest plan
yarn buildpasses (ESM + CJS)yarn test— 26 tests pass (14 new for VirtualSelectList, 12 existing unchanged)