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
No way to know when measurements are complete to safely scroll
"Sticky bottom" behavior (stay at bottom unless user scrolls up) requires significant custom logic
Use Case
Chat applications, terminal/log viewers, and any interface where:
Items are dynamically sized
New items are appended at the end
User expects to see the latest item automatically
User can scroll up without being forced back down
Proposed API
constvirtualizer=useVirtualizer({
count,getScrollElement: ()=>parentRef.current,estimateSize: ()=>50,// New option:stickToBottom: true,})// New methods/propertiesvirtualizer.scrollToBottom()virtualizer.isAtBottom
Summary
Add built-in support for "auto-scroll to bottom" behavior, commonly needed for chat interfaces, logs, and similar use cases.
Problem
Currently, implementing auto-scroll to bottom with dynamic item heights is unreliable:
scrollToIndex(lastIndex, { align: "end" })often falls short with dynamic heights (v3.13.8 doesn't scroll all the way to the bottom correctly #1001)Use Case
Chat applications, terminal/log viewers, and any interface where:
Proposed API
Related