catamphetamine / virtual-scroller

A component for efficiently rendering large lists of variable height items

Home Page:https://catamphetamine.gitlab.io/virtual-scroller/?dynamic=%E2%9C%93

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reseting scroll and padding-top when dynamic list is added new items at the end

bruncanepa opened this issue · comments

I'm having a problem only when the list updates (after fetched new items). The scroll position goes to the first element, instead of preserving it.

I'm using the component like this.

<VirtualScroller
    preserveScrollPosition
    items={items}
    itemComponent={({ children }) => Item(children)}
/>

Can you help me please!