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 carousel slot rendering skipped inner scopedSlots #284

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Kapcash
Copy link

@Kapcash Kapcash commented Feb 1, 2024

When rendering the carousel slot with a component, itself using a scopedSlot, it won't be rendered correctly. The scopedSlot is skipped and our component is rendered as if it didn't received any slot.

Example:

<VueSlickCarousel>
  <CarouselCard>
    <h1>Here is my carousel card</h1>
    <template #footer="{ name }"> <!-- This won't be rendered -->
      Author: {{ name }}
    </template>
  </CarouselCard>
</VueSlickCarousel>

Here, the scoped slot footer is never rendered, as if we never passed it.


I digged into the library to understand the problem and turns out it's a simple typo in the keys to copy when cloning the children vnode...

Note: I know this won't be merged as the library isn't maintained anymore. I published this fix on my own fork and I'm using this in production for probably ever.

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.

1 participant