ericferreira1992 / ag-virtual-scroll

Component of virtual-scroll. It easy to use and works light and clean. He also work with differents items height.
https://ericferreira1992.github.io/ag-virtual-scroll/
MIT License
24 stars 8 forks source link

Set scroll position? #11

Closed Andersoonalves closed 2 years ago

Andersoonalves commented 2 years ago

Hello, I would like to know if there is a possibility to set the scroll position when starting the list or after an action. Is there any way to do it?

ericferreira1992 commented 2 years ago

Hello Anderson. Thanks for feedback. About the "if there is a possibility to set the scroll position", it is can be possible as long as you use rows with same height, because when they use the dynamic height, and set a scroll position, the virtual-scroll doesn't behave as expected, because its algorithm strategy.

Anyway, the ag-virtual-scroll doesn't have a input or interface to do it (change scroll position), but you can use vanillaJs to handle the scrollTop of ag-virtual-scroll element. But I will take a look at that in the soon future, ok? (But I don't know when)