-
Notifications
You must be signed in to change notification settings - Fork 56
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
Error with v-for #2
Comments
Could you provide some more details on this? I'm not totally sure what you mean. |
I'm having the same issue. If I try to generate the |
same here... it re-render outside |
Hmmm, I'll look into this. @brettgullan could you give me a code sample as well? |
Hey @drewjbartlett Sorry, false alarm! Found the issue with my code. All good. |
Oh good! Closing this for now then! |
Hi. I have the same issue. I use Fragment of my code:<flickity ref="flickity" class="carousel" :options="flickityOptions">
<div class="carousel-cell" v-for="(item, index) in slides" :key="index">
{{ item.title }}
</div>
</flickity> import Flickity from 'vue-flickity'
export default {
components: {
Flickity
},
data () {
return {
flickityOptions: {
prevNextButtons: false,
pageDots: false,
wrapAround: true
}
}
}
} Generated code:<div class tabindex="0">
<div class="flickity-viewport" style="height: 0px;">
<div class="flickity-slider" style="left: 0px;">
</div>
<div class="carousel-cell">...</div>
<div class="carousel-cell">...</div>
</div> |
@lukaszflorczak Yep, I'm having the exact same issue. @brettgullan Can you please tell us how you solved this? |
+1 Flickity initializes before the loop ends |
@alexbudure is correct You can remedy this issue by using a Example: <flickity v-if="Object.keys(slides).length > 0" ref="flickity" class="carousel" :options="flickityOptions">
<div class="carousel-cell" v-for="(item, index) in slides" :key="index">
{{ item.title }}
</div>
</flickity> |
Wow thanks dude. You saved me. ))) |
downside of using v-if to solve this, is that it breaks the |
I was working on it for 3 hours to figure it out why act like this... Thank you so much 🙏 It worked for me. |
Hello,
I tried the component, but if I try to add v-for the elments gona be outside the view port
Rendering:
The text was updated successfully, but these errors were encountered: