vue-virtual-scroller icon indicating copy to clipboard operation
vue-virtual-scroller copied to clipboard

Scroller render doesn't account for the height of leading or trailing slots

Open danatcofo opened this issue 4 years ago • 3 comments
trafficstars

Not sure how this is doing it under the covers but heres a video showing what I'm talking about. Screen Recording 2021-09-28 at 5 25 50 PM

Inside the #before slot we have elements that get toggle to be sticky or relative. The sticky version works fine visually where the elements disappear and are reused smoothly. The relative version treats the area as if it where sticky... i.e preserving the #before slot sizing internally.

Is there something I can do to force or tell the scoller to use the area in the #before slot as well such that it doesn't have the blank area?

danatcofo avatar Sep 28 '21 22:09 danatcofo

I can reproduce this actually on the demo here https://akryum.github.io/vue-virtual-scroller/#/dynamic by setting the hight of the leading notice element to 500px in the developer tools.

So it appears that the logic doesn't account for leading height of the #before slot

danatcofo avatar Sep 29 '21 14:09 danatcofo

Looks like a work-around for this bug is to set the :buffer="" to the height of the #before slot contents.

danatcofo avatar Sep 29 '21 16:09 danatcofo

Seems like a duplicate of #510

semiaddict avatar Oct 28 '21 07:10 semiaddict