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

:data-index="index" is incorrect in DynamicScrollerItem demo

Open lizyChy0329 opened this issue 1 year ago • 1 comments
trafficstars

Clear and concise description of the problem

image image

Suggested solution

key-field and index must be consistent otherwise the size of the computed could be 0.

// DynamicScroller
key-field="post_id"
// DynamicScrollerItem
:data-index="item.post_id"
:index="item.post_id"

image

Alternative

No response

Additional context

No response

Validations

  • [X] Read the docs.
  • [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

lizyChy0329 avatar Mar 28 '24 07:03 lizyChy0329

my items were not being rendered and after doing what you posted, it worked, thx: I used index instead

// DynamicScrollerItem
:data-index="index"
:index="index"

jamesallan93 avatar Dec 01 '24 16:12 jamesallan93