@dobbel thanks for the tip! I actually started that thread haha, got my questioned answered!
Posts made by flunkout-dvlpr
-
RE: what is the proper way to use multiple carousel components inside v-for
-
RE: Q-Carousel v-model in nested v-for?
@metalsadman That worked perfectly! Thank you!, I guess I got too caught up trying to find an “elegant” solution that would work with the data that was already provided that totally dismissed this approach. Sometimes simple is better!
-
RE: Q-Carousel v-model in nested v-for?
Thanks for the reply! @metalsadman sorry about the confusion, I dropped it in codepen, as you will see the issue I am having is with the v-model affecting all of the carousel slides not just the one clicked.
https://codepen.io/launchit-studio/pen/jOVrKzQ -
Q-Carousel v-model in nested v-for?
Hello everyone, new to the forum, my apologies if this is not the right place to post this question.
I am trying to use multiple q-carousel/slide components inside q-cards with v-for loops but I’m having trouble figuring out the correct way to assign the q-carousel v-model so that it’s unique and doesn’t update all the q-carousels when the slide is changed
Here is the code I have so far:<q-card v-for="(item, index) in inventory" :key="index" style="width: 20rem;" > <q-card-section class="q-pa-none text-white" > <q-carousel animated arrows navigation infinite style="height: 15rem;" v-model="slide" // What should this be assigned so that > <q-carousel-slide v-for="(image, index) in item.images" :key="index" :name="index" //It works with the slide name and only updates the respective q-carousel :img-src="image.url" > </q-carousel-slide> </q-carousel> </q-card-section> </q-card>
Hopefully this makes sense, It’s a bit hard for me to explain it but let me know anything that needs clarification
Thank you!!!
-
RE: what is the proper way to use multiple carousel components inside v-for
Hello guys, new to the forum, I am having the same issue as you @iodoli , did you ever figure out a good solution. I am trying to use the q-carousel inside q-cards using a v-for for the q-cards and a v-for inside for the q-carousel-slides. Can’t seem to wrap my head around what to use for the q-carousel v-model? Any suggestions would be greatly appreciated