You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, it's an expected one.
The overscaned items opposite to the scroll direction will be unmounted during scrolling to reduce cost. That's similar behavior to react-window.
Instead of remounting, applying content-visibility: hidden or React's experimental Offscreen(renamed to Activity recently), or disabling unmount may result in better results in some case, but not verified yet.
related #181
I see, thanks! Yes, an append only mode sounds like it's what I'm looking for. Basically I want to disable virtual scroll temporarily but not remove the VList because I'm lazy :)
Describe the bug
When you have a large overscroll value to force the entire list to be rendered, items are re-rendered unnecessarily during scroll.
To Reproduce
useEffect(() => console.log('rerender'), [])
to check rerenders.rerender
is printed many times during scroll for the same componentsI have a reproduction codepen here: https://codepen.io/aeharding/pen/VwgVjVz open console and scroll the area, observe rerender is printed many times.
Expected behavior
rerender
only printed once at startup per component with an overscan greater than the entire number of itemsPlatform:
Additional context
None
The text was updated successfully, but these errors were encountered: