If you tap the last dots and swipe it to the right edge and swipe left one page. The dots will disappear.
The problem is the targetSlide is wrong.
onSliderEdge = () => { const {slidesToShow} = sliderSettings const lastCount = this.slider.innerSlider.state.slideCount - slidesToShow const lastTarget = this.slider.innerSlider.state.targetSlide if (lastCount === this.slider.innerSlider.state.currentSlide) this.slider.slickGoTo(lastTarget); } <Slider ref={r => this.slider = r} {...sliderSettings} onEdge={this.onSliderEdge}> {list.map(value => value)} </Slider>
We force to update the targetSlide after tapping the last dot and swipe it on edge.
@copyright MRcodingRoom
觀看更多文章請點MRcoding筆記
觀看更多文章請點MRcoding筆記