I've might missed something but whatever value I set for initialSlide on Swiper with dynamic content it always start with 0.
const params = {
initialSlide: 2,
direction: 'vertical',
height: 300,
threshold: 10,
slidesPerView: 1,
observer: true,
shouldSwiperUpdate: true,
keyboard: true,
}
....
<Swiper
{...params}
ref={node => node ? this.swiper = node.swiper : null}
>
{
this.props.children
}
</Swiper>
But it works well for static number of children 馃槓
What is wrong here?
I've always initialized the swiper with an activeIndex of whichever slide I wish to start on. I've always worked with a dynamic number of slides and this has worked for me.
Thanks @gareys! now it works better)
@gareys can you please share code how you are initializing, I am not able to move the slider with activeIndex
Most helpful comment
@gareys can you please share code how you are initializing, I am not able to move the slider with
activeIndex