FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
3.07k stars 595 forks source link

v5: Migrate scrollPage: reminded property to v5 #868

Closed ValGeorgiev closed 2 years ago

ValGeorgiev commented 2 years ago

Description

As it was removed firstly, we are migrating scrollPage: reminded back to v5. Currently if we have v5 carousel without wrapAround and slides are not even to slidesToShow, we can see white screen in the end of the carousel. This can be prevented by adding scrollPage: reminded property.

This PR covers the straightforward scenario when slidesToShow and slidesToScroll are equal. There is no point slidesToScroll is more than slidesToShow, because some slides will be missed. Next PR will cover the scenario when slidesToScroll is less than slidesToShow.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nuka-carousel/nuka-carousel/DiofZQGvCd9d78LxNoEsZBzAJzbi
✅ Preview: https://nuka-carousel-git-fix-reminder-slides-nuka-carousel.vercel.app