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

Undocumented and confusing behavior of setPage method

Open reinvanoyen opened this issue 9 years ago • 1 comments
trafficstars

First of all, let me thank you for creating this wonderful component. It works great and gives a native feel on mobile devices.

I just wanted to let you know I found it confusing that, when trying to set the swiper to the first element, you have to set it using setPage(1) instead of setPage(0). When using setPage(0), it's not clear it doesn't work like that, because it actually scrolls to the first item. It's upon swiping you notice there's something wrong when you have to swipe twice to get to the next slide. It would've saved me a lot of time if this was either:

  • Implemented like most people expect it to be (setPage(0)) where the first item is represented by 0, we're programmers, right?
  • If this confusing behavior was documented.

Just my two cents.

Thanks again for the wonderful component!

reinvanoyen avatar Sep 21 '16 09:09 reinvanoyen

Sorry, I didn't noticed that. Thank you for let me know what a big mistake I've made.

ValorLin avatar Sep 22 '16 08:09 ValorLin