[info] Always start at the bottom of the list
See original GitHub issueHi! I’m building a chat system using React Virtuoso and I’m using scrollToIndex to scroll right to the bottom of the list, with a tiny delay. This works “ok” but as I said there’s a tiny delay. I was wondering if there’s a way to automatically show the list scrolled at the bottom already?
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:7 (4 by maintainers)
Top Results From Across the Web
How can I scroll list keeping items always at the bottom?
I am trying to create an html/css "chat style" ul list that loads all items from the bottom. I have tried several attempts...
Read more >Video: Drop-down list settings - Microsoft Support
Training: You can use a comma-delimited list, a cell range, or a named range to define the options in a drop-down list. This...
Read more >position - CSS: Cascading Style Sheets - MDN Web Docs
The position CSS property sets how an element is positioned in a document. The top, right, bottom, and left properties determine the final ......
Read more >4 shortcuts to get to the bottom of your excel spreadsheet fast
The first shortcut is the 'End' key. This key is located at the bottom right of your keyboard, in between the 'PgDn' and...
Read more >Customize your Safari settings on iPhone - Apple Support
Customize your start page · Tap the Tabs button , then tap · Scroll to the bottom of the page, then tap Edit....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@iJimmyWei Thanks for sharing that! I am working on this feature right now (with a timeline / chat UI in mind), should be available in the upcoming weeks.
For anyone looking at this issue when building a “chat” system, one way to get around this is to apply a transformation on the Virtuoso style prop, i.e
<Virtuoso style={{rotate(180deg) scaleX(-1)}}>and then apply the same transformation but on theItemContainertoo (so the item is reversed back to be readable again).The scrollbar itself naturally reverses too (works on mac, chrome and firefox), so you’ll be starting from the bottom. Furthermore, you’ll have to manually invert scrolling. This kind of methodology works well as
onEndReachedwill get called properly when you scroll to the “top”.The idea was taken from https://facebook.github.io/react-native/docs/flatlist#inverted where they apply a transformation too for their inverted prop.