auto scroll to top after new items appended inside @totop event
Let say we have and some list of items, in the @totop event i fetch more items and concatenate them, and after that scroll immediately goes to 0 (at the very top) which is wrong, it should stay where it was before fetching new items.
is there any solutions?
actually i made one by finding id of last message before fetching new ones and finding that message in new list then scrollToIndex but the scroll still glitches i see that transition after very top to the index. it looks awful :(
Actualy you can't keep scroll position stay where it was before rendering new contents to head.
The way you can do is scrollTo an offset which is the addition items all height like chat-room demo.
@tangbc I've seen this demo, but it does not work, because vsl.getSize() returns undefined for some elements which are really exists
vsl.getSize() base on ResizeObserver api, does your browser not support it?
@tangbc Latest Chrome. it sure does support ResizeObserver.
I also seem to be seeing this issue, with getSize(id) returning undefined. Also on Chrome.
@xrei Did you find any workable solution? I also encountered this problem