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

[Feature Request] Document scoped slot usage as alternative to `data-component`

Open cmitz opened this issue 2 years ago • 2 comments

Describe the feature request

The documentation doesn't specify this, but in the source code using a #default slot is clearly supported. I think it would be great if that was documented.

Example

<VirtualList
  data-key="id"
  :data-sources="epcisEvents"
  :data-component="EmptyComponent"
  :keeps="6"
>
  <template #item="{ index, item }">
    <MyComponent
      :list-item="item"
      @custom-listener
    />
  </template>
</VirtualList>

cmitz avatar Apr 04 '23 10:04 cmitz

Hello @cmitz,

I have a question about your EmptyComponent. What is it exactly ? An empty object ? A component with an empty template and props ?

Thanks per advance

Dowlead avatar Apr 12 '23 11:04 Dowlead

That is indeed literaly what it is, but I had to put it in data:

data: {
  EmptyComponent: {},
},
components: {
  VirtualList,
}

cmitz avatar Apr 12 '23 14:04 cmitz