bvaughn / react-virtualized

React components for efficiently rendering large lists and tabular data
http://bvaughn.github.io/react-virtualized/
MIT License
26.26k stars 3.06k forks source link

FEATURE REQUEST: Add a way to start from the bottom of the list and scroll upward #1622

Closed nzayatz14 closed 1 week ago

nzayatz14 commented 3 years ago

Feature Request

It would be nice if there way a way to effectively reverse the virtualization of the table, in a way where the users scroll position starts at the bottom of the virtualized table, then scrolls up to load more rows.

I am trying to create a virtualized chat window in my application. Generally speaking a lot of chat windows will show their latest data at the bottom, then the user will scroll up to see older messages.

I believe the only external interface you would need would be some sort of reverse or scrollFromBottom boolean. You would be able to set that and the table would just scroll from the bottom up.

iMessage, Facebook Chat, Instagram Chat, etc

MauroGL commented 3 years ago

you could solve this by setting a state with scrollToIndex value and setting the initial value as listData.length - 1

theromis commented 3 years ago

@MauroGL doing it and it still scrolls ugly :( jumping, after loadMore focusing in wrong place, e.t.c

shuiRong commented 2 years ago

@theromis same here. Since then, have you found any solutions or alternatives?

ForgoneReality commented 2 years ago

is this not a feature yet? looking to implement a discord-like messaging system :/

has anyone found a workaround?

mihanizm56 commented 1 year ago

I'm building the chat with react-virtualized and have the same problem too!

tchaton commented 1 year ago

Any updates ?

IgorKhomenko commented 1 year ago

I tried many diff libraries during my career. The only lib which can be well used for Chat-like view is https://github.com/Flipkart/recyclerlistview

The only difficulty with recyclerlistview is that you need to measure each cell height and provide this value into the lib. But this can be managed.

sikhaman commented 6 months ago

to be honest InfiniteLoader its kinda wierd. Mby it is good to load entities, but just for load more items its overdose. I would like to see something rly simple like onReachedBottom and callback you can pass to load more items