vue-virtual-scroll-list icon indicating copy to clipboard operation
vue-virtual-scroll-list copied to clipboard

dynamic size error when the item have random height

Open nguyenleminhdev opened this issue 2 years ago • 1 comments

in my data component:

<template>
  <div class="item">    
    <div class="id"  :style="{ height: `${getRandomInt(290, 300)}px` }">
      {{  source.text  }}
    </div>
  </div>
</template>

height of div in my component is dynamic, and when i scroll, the view is "blink".

it seems that the logic of library to get the height of the div "item" is run before the logic when vue set style height.

so please help me, many thanks

nguyenleminhdev avatar Feb 16 '23 08:02 nguyenleminhdev

I try to use vue-virtual-scroller and it seems it has the similar issue. Just in case you want to change the lib to create a virtual scroll.

ghost avatar Jul 03 '23 09:07 ghost