YIZHUANG / react-multi-carousel

A lightweight production-ready Carousel that rocks supports multiple items and server-side rendering with no dependency. Bundle size 2kb.
MIT License
1.25k stars 286 forks source link

Wrong active dots calculation #247

Open aldeimos opened 3 years ago

aldeimos commented 3 years ago

Prerequisite Expected behavior of dots

Describe the bug Bug appears after 1 full iteration of scrolling. isActive stop working correctly. I did little research and to reproduce this bug you need special length of children. In this case 7

To Reproduce Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/react-multi-carousel-customdot-forked-bmpie?file=/src/App.js
  2. Click on Arrow Right 5 times.
  3. While clicking watch at Dots ( in this case is 1,2,3 where red color is active dot)
  4. Third dot wont be active

Expected behavior Dots working fine

Desktop (please complete the following information):