vue-virtual-scroll-list
vue-virtual-scroll-list copied to clipboard
[Feature Request] Document scoped slot usage as alternative to `data-component`
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>
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
That is indeed literaly what it is, but I had to put it in data:
data: {
EmptyComponent: {},
},
components: {
VirtualList,
}