Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next() is not working when perPage option is larger than the number of slides available #49

Closed
RenanOliv opened this issue Apr 12, 2017 · 2 comments
Assignees
Labels

Comments

@RenanOliv
Copy link

What is happening

Hi! The carousel drag is becoming unresponsive when you use the next() method. This is only happening if the number of slides to be shown is larger than number the slides available. Here an example with 4 slides and 5 perPage slides showing this behaviour.

More info that may help

  • This seems to affect only next().
  • The carousel will work as expected when passing a number with the goTo() method.
  • currentSlide is returning -1 when next() is used.
@pawelgrzybek
Copy link
Owner

Hi Renan. Thanks for reporting.

It is a good sport that next() method changes value from 0 to -1. Is is a bug but not major one as it doesn't affect carousel functionality — it will be fixed though. The issue to resolve here is not inside next() method. The problem is with goTo() method as it shouldn't slide items in a manner that leaves an empty gaps on the end of a selector — it is bad UX.

I still consider this as an edge case scenario because a main purpose of using carousel is to slide items when there is not enough of room for it. Nobody is using carousel to waste space on the screen.

Probably the best thing here wold be preventing user from invoking any method like next(), prev() or goTo() when there is no need for them.

It is easy fix and edge case. It will be fixed in next minor release. Thanks 🍻

@pawelgrzybek
Copy link
Owner

Hi @RenanOliv.

Just to let you know that your issue has been resolved. Thanks again for reporting. If you are nosy of the solution, that is the commit...

9fbbe97#diff-0f98adb017f3c5a836cd2a762834f5b9

Thanks a lot and have a great weekend 🍻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants