ismail9k / vue3-carousel

Vue 3 carousel component
https://ismail9k.github.io/vue3-carousel/
MIT License
661 stars 164 forks source link

Slide order: -1 when carousel has only one item or after element was added in carousel. #37

Closed slobodadev closed 3 years ago

slobodadev commented 3 years ago

My template:

<carousel v-if="presentedVideos.length"  :wrap-around="true">
  <slide class="slide" v-for="video in presentedVideos" :key="video.id">
     <iframe class="videoFile" :src="video.video_link"></iframe>
  </slide>
  <template #addons>
    <navigation />
  </template>
</carousel>
  1. When presentedVideos ref contains only one item in array - carousel has crashed. I can't slide anymore. Screenshot from 2021-04-05 15-12-42 Element outside

  2. Same problem when I add new instance. Screenshot from 2021-04-06 12-18-16 (after reload problem disappears)

  3. Another case when I remove instance. I'm using this way - https://github.com/ismail9k/vue3-carousel/issues/36#issuecomment-813019681 Carousel items is not updating immediately. I should click on the slide arrows. After that removed instance is disappeared.

ismail9k commented 3 years ago

Could you provide me with a working sandbox example, so I can debug this issue :)

mcorcias commented 3 years ago

when the carousel has only one item see nothing, after you update data no see immediately the changes

ismail9k commented 3 years ago

fixed in v0.1.15

slobodadev commented 3 years ago

@ismail9k Still exits the problem with dynamic data. When you remove an instance, the changes is not appearing immediately. You should refresh the page. Even a bad solution with forceUpdate doesn't work