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

fix item wrapper when using item slot API #393

Merged
merged 5 commits into from
May 29, 2023
Merged

fix item wrapper when using item slot API #393

merged 5 commits into from
May 29, 2023

Conversation

fidalgodev
Copy link
Contributor

@fidalgodev fidalgodev commented Oct 19, 2022

What kind of this PR? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Build-related changes
  • Other, please describe:

Other information:
With the addition of this PR. which allows to use a <template #item="{ item }">, it added a new div wrapper every time, which will be around the element we pass in :item-tag prop. This essentially breaks the usage of this package for tables, since it will do this:
Screenshot 2022-10-19 at 11 48 49

So when you chose the :item-tag to be tr together with the item slot API, it will never work, since it will break your table.

This PR removes that div wrapper when the item slot API is used. Basically we don't need to call h (createElement) again when the item-slot API is being used.

@fidalgodev fidalgodev closed this Oct 19, 2022
@fidalgodev fidalgodev reopened this Oct 19, 2022
@tangbc tangbc merged commit b8a09a4 into tangbc:master May 29, 2023
bimalghartimagar pushed a commit to bimalghartimagar/vue-virtual-scroll-list that referenced this pull request Jan 21, 2024
* fix item slot

* fix item slot

* fix item slot

* fix item slot

* fix item slot
@mtMbegonia
Copy link

how to use this?

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

Successfully merging this pull request may close these issues.

3 participants