react-virtualized icon indicating copy to clipboard operation
react-virtualized copied to clipboard

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

Open nzayatz14 opened this issue 4 years ago • 8 comments

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.

  • What's your use case? (Tell me about your application and what problem you're trying to solve.)

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.

  • What interface do you have in mind? (What new properties or methods do you think might be helpful?)

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.

  • Can you point to similar functionality with any existing libraries or components? (Working demos can be helpful.)

iMessage, Facebook Chat, Instagram Chat, etc

nzayatz14 avatar Dec 22 '20 12:12 nzayatz14

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

MauroGL avatar Feb 28 '21 15:02 MauroGL

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

theromis avatar May 03 '21 04:05 theromis

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

shuiRong avatar Nov 07 '21 03:11 shuiRong

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

has anyone found a workaround?

ForgoneReality avatar Aug 28 '22 05:08 ForgoneReality

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

mihanizm56 avatar Jan 12 '23 22:01 mihanizm56

Any updates ?

tchaton avatar Jun 12 '23 19:06 tchaton

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.

IgorKhomenko avatar Jul 31 '23 07:07 IgorKhomenko

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

sikhaman avatar Feb 20 '24 16:02 sikhaman