tiny-swiper icon indicating copy to clipboard operation
tiny-swiper copied to clipboard

initialSlide and nextEl navigation

Open artnova-david opened this issue 4 years ago • 2 comments

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]

artnova-david avatar Jan 19 '21 16:01 artnova-david

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 avatar Jan 20 '21 02:01 joe223

@joe223 is the help still required here?

a-kud avatar Sep 13 '23 00:09 a-kud