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

Mounted hook always triggers on newly loaded elements causing flickering

Open Boshes opened this issue 4 years ago • 0 comments

Describe

The Mounted hook of the item component always triggers on newly loaded elements causing flickering.

This seems to be stemming from this issue that was merged in https://github.com/tangbc/vue-virtual-scroll-list/issues/294 but seems to have been removed in this commit, https://github.com/tangbc/vue-virtual-scroll-list/commit/950cb6a490aeeaf03243fe50de8979a79c1e4091.

This was recently brought up again in this issue, https://github.com/tangbc/vue-virtual-scroll-list/issues/348, and the issue doesn't seem to be fixed as it.

Doing the solution in the first issue for the key property being the uniqueKey Item pushed to the slots in getRenderSlots does fix the issue to prevent all mounted hooks from triggering and only triggering those initially loaded.

I'm unsure as to why the first issue's solution was removed and hoping for a proper fix.

To Reproduce

I created this codesandbox of the issue https://codesandbox.io/s/blazing-sky-3b9gu

Other

  • Testing on Chrome Version 96.0.4664.55 (Official Build) (x86_64)

Boshes avatar Dec 03 '21 19:12 Boshes