akiran / react-slick

React carousel component
http://react-slick.neostack.com/
MIT License
11.73k stars 2.1k forks source link

fix(#2017): Dots state error when SlideToshow uses decimal value and … #2306

Open vishwajeet1 opened 10 months ago

vishwajeet1 commented 10 months ago

Issue: #2017

solution

  1. Round off values in JavaScript calculations because reliability issues arise with decimal values.
  2. When calculating the leftBound, use slidesToShow instead of 1, as the last active slide will be slideCount - slidesToShow.