akiran / react-slick

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

Add support for onArrowClick #2179

Closed JorgeSivil closed 1 year ago

JorgeSivil commented 2 years ago

I had to fire an event on arrow click and it wasn't possible, I was able to do what I needed only with beforeChange and it didn't work right because I had a re rendering issue in which upon scrolling vertically and coming up again, the carousel would be shifted to the right.

The workaround was to do a goTo(0) upon scrolling, and had to add a flag in the window scope to prevent the event from firing when doing a goTo(0). It would have been so much easier if I just had a onArrowClick() event.

Thanks a lot!

pratyushbh commented 1 year ago

Unfortunately, this feature is not supported by the JQuery Slick carousel on which React Slick is based upon.