FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixed #5340 react select list issue by robinsowell · Pull Request #5341 · ExpressionEngine/ExpressionEngine · GitHub

Fixed #5340 react select list issue - #5341

Open
robinsowell wants to merge 3 commits into
7.devfrom
bugfix/react-select-virtualized
Open

Fixed #5340 react select list issue#5341
robinsowell wants to merge 3 commits into
7.devfrom
bugfix/react-select-virtualized

Conversation

Copy link
Copy Markdown
Contributor

#5340

Where large scrolls could eventually 'lose' the options.

Copy link
Copy Markdown
Contributor Author

reviewed: Summary: Fixes the virtualized select list "losing" options during large scrolls (#5340). The root cause was that VirtualizedItemList.getVisibleRange() computed the visible window using a fixed 40px row height, while the actual DOM positioning (getTotalHeight() / getOffsetTop()) used variable heights via getVirtualItemHeight(). On lists with taller rows (items with instructions), the two drifted apart and the rendered slice no longer matched where items were placed — producing blank gaps / vanishing options on long scrolls.

Verdict: Approve. The fix is correct and well-scoped.

What's good
getVisibleRange() now walks actual item heights, making it consistent with getTotalHeight()/getOffsetTop(). This is the right fix for the reported bug.
virtualizationHeight is now properly forwarded into , so containerHeight honors the configured height instead of being hard-locked at 400.
Sensible defensive additions: the if (!item) return 40 guard in getVirtualItemHeight() and the empty-list early return in getVisibleRange().
The .es6 source and the hand-maintained .js artifact were updated consistently.

Minor (non-blocking)
In the end-of-range loop, visibleHeight accumulates from the top of startIndex rather than from scrollTop. Since the first item's top usually sits slightly above the viewport, the bottom can be under-counted by up to one row. The overscan of 10 comfortably absorbs this in practice, so no change required — just noting it.
select_list.js appears to be hand-maintained alongside select_list.es6 (no gulp step compiles it). Worth confirming that's the intended workflow so the two don't diverge in future edits.

TomJaeger requested a review from Yulyaswan July 21, 2026 14:44

Copy link
Copy Markdown
Collaborator

checked
from my side it's ready to approve

@robinsowell if it works for you as well left comment and I'll approve it
Thanks

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL