Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cmitz opened this issue Apr 4, 2023 · 2 comments

Comments

@cmitz
Copy link

cmitz commented Apr 4, 2023

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>
@Dowlead
Copy link

Dowlead commented Apr 12, 2023

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

@cmitz
Copy link
Author

cmitz commented Apr 12, 2023

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants