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

Slides from slots is not working #433

Closed
Tofandel opened this issue Nov 28, 2024 · 0 comments · Fixed by #434
Closed

Slides from slots is not working #433

Tofandel opened this issue Nov 28, 2024 · 0 comments · Fixed by #434

Comments

@Tofandel
Copy link
Contributor

Tofandel commented Nov 28, 2024

Using a carousel where the slides are coming from a slot is not working

https://stackblitz.com/edit/vue3-carousel-example-basic-vsybzp?file=src%2FCarousel.vue,src%2FApp.vue,src%2FSlides.vue

This is due to the vNode traversal which is done only once, because slots are not mounted yet at that time. The correct approach is to use provide inject (which is already being used for everything else) to register the slides to the carousel

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 a pull request may close this issue.

1 participant