vue-virtual-scroll-list icon indicating copy to clipboard operation
vue-virtual-scroll-list copied to clipboard

Preserve scroll position on infinite scroll up

Open zardoy opened this issue 2 years ago • 1 comments

Describe the feature request

There is chat room demo. If you trigger the infinite scroll, and then scroll down immediately, after infinite scroll will load the items, you'll lose original position. This might be very annoying for real apps. GIF:

May-31-2022 02-12-17

I think we should provide an easy way to preserve position in these cases (some prop, or maybe enable it by default?)

zardoy avatar May 30 '22 23:05 zardoy

I have the same problem, and sometimes the value obtained by getSize(id) is undefined.

I tried to temporarily store the height + newMessages offest through getOffset(), and I can get a value close to the actual top height, but it is not completely consistent. (maybe a CSS factor?)

ellermister avatar Jun 13 '22 07:06 ellermister