This repository was archived by the owner on Jul 8, 2025. It is now read-only.

Description
Describe the bug
When the slide changes because of autoplay, the onChange handler is not called. This way you can't correctly control the component while using autoplay.
To Reproduce
Steps to reproduce the behavior:
- Use controlled carousel with autoplay plugin enabled.
- Put a console.log statement in the onChange handler.
- Notice that it doesn't fire when autoplay advances.
Expected behavior
I would expect the onChange handler to be called when the carousel changes slide because of autoplay.
Screenshots
/
Environment
System:
OS: macOS 11.1
CPU: (16) x64 Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
Memory: 4.50 GB / 32.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 14.15.1 - ~/.nvm/versions/node/v14.15.1/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.1/bin/yarn
npm: 7.5.5 - ~/.nvm/versions/node/v14.15.1/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Browsers:
Brave Browser: 88.1.19.86
Chrome: 90.0.4430.72
Firefox: 70.0.1
Safari: 14.0.2
npmPackages:
@brainhubeu/react-carousel: ^2.0.3 => 2.0.3
I used Brave on my laptop.
Additional context
/