tiny-swiper
tiny-swiper copied to clipboard
initialSlide and nextEl navigation
Describe the bug When passing an index to 'initialSlide' and the index is the last item in the array the 'nextEl' button is not automatically disabled, but it gets disabled after clicking on it.
Expected behavior When initializing Swiper with initialSlide as last index in the array automatically disable the 'nextEl' button.
Information
- Tiny-Swiper Version: [e.g. v2.0.1]
- OS: [e.g. Windows]
- Browser: [e.g. FireFox Developer 85.0b9]
Hi @artnova-david, problem occurred while after-slide
event triggered.
Sliders will slide to initialSlide
after DOM rendered on initialization process. Here is the code show below
https://github.com/joe223/tiny-swiper/blob/99f88d4bf690efab824234ccf326e2260665ed36/packages/tiny-swiper/src/core/index.ts#L123-L128
We should update Button state after slide action just like
https://github.com/joe223/tiny-swiper/blob/99f88d4bf690efab824234ccf326e2260665ed36/packages/tiny-swiper/src/modules/navigation.ts#L115-L120
Would you like to create a fix PR 😁 ?
@joe223 is the help still required here?