SSENSE/vue-carousel

Bug: navigateTo="newSlide" doesn't work with 5 or more slides per page

Open

#193 opened on May 4, 2018

View on GitHub
 (1 comment) (1 reaction) (0 assignees)JavaScript (1,705 stars) (513 forks)batch import
bughelp wantedneed repro

Description

If I change 5 slides per page for 4 or less, the :navigateTo prop works fine.

Here is my code, note that on 1024 width screen it does not work because of 5 slides.

<carousel
        ref="carousel"
        :per-page-custom="[[1024,5], [768,4], [480,4], [340, 3]]"
        :navigation-enabled="true"
        :pagination-enabled="false"
        :navigationClickTargetSize="0"
        :navigation-next-label="'<i></i>'"
        :navigation-prev-label="'<i></i>'"
        :navigateTo="newSlide"
        @pageChange="pageChange"
        :loop="true">
    <slide v-for="(p,k) in periods" :key="k">
        <a @click="period = p" :class="period == p ? 'active' : ''">{{ p.title
            }}</a>
    </slide>
</carousel>

Contributor guide