Closed alden-ozburn closed 6 years ago
It seems to be based on the keeps
variable, in turn based on the remain
and bench
variables. It looks like the calculation that relies on them to find whether it is the last index does not take into account the view window perhaps?
Great work so far by the way, this is definitely the most thorough virtual scroller for vue.
For anyone else running into this issue, a quick hack to bypass this issue is to pad the list with 0 height dummy element, using variable height mode.
Reason is: start
and end
calculate right but offset wrong if start
more than remains.
Change commit here: https://github.com/tangbc/vue-virtual-scroll-list/commit/d587f682432574c6cb1df54e2db372befc28c905
Reproduction
From the first example: https://tangbc.github.io/vue-virtual-scroll-list/examples/finite/
Entering a start index >= 99950 scrolls to the bottom.
This is despite the fact that there is more room to scroll down up within the window.