Summary
The virtualized Cascader can render a stale initial window when React Compiler is enabled.
Reproduction
- Enable React Compiler for the installed Cascader source.
- Render the official virtualized Cascader example with enough items to require scrolling.
- Scroll the list substantially.
The scroll position changes, but the rendered virtual rows may remain the initial window, leaving blank space or missing items.
Cause
The virtualizer object keeps a stable identity while getVirtualItems() returns data that changes after scrolling. Compiler memoization of the consuming renderer can therefore reuse an outdated result. Skipping compilation of the wrapped hook alone does not protect its consuming components.
Expected
Virtual rows update after scrolling with React Compiler enabled.
Environment
React 19, React Compiler, @tanstack/react-virtual, ReUI Cascader virtual example.
Proposed Fix
PR #135 adds "use no memo" to the two consuming virtual row renderers in both the Base UI and Radix implementations.
The PR includes validation details and the remaining registry-generation limitation.
Summary
The virtualized Cascader can render a stale initial window when React Compiler is enabled.
Reproduction
The scroll position changes, but the rendered virtual rows may remain the initial window, leaving blank space or missing items.
Cause
The virtualizer object keeps a stable identity while
getVirtualItems()returns data that changes after scrolling. Compiler memoization of the consuming renderer can therefore reuse an outdated result. Skipping compilation of the wrapped hook alone does not protect its consuming components.Expected
Virtual rows update after scrolling with React Compiler enabled.
Environment
React 19, React Compiler,
@tanstack/react-virtual, ReUI Cascader virtual example.Proposed Fix
PR #135 adds
"use no memo"to the two consuming virtual row renderers in both the Base UI and Radix implementations.The PR includes validation details and the remaining registry-generation limitation.