react-slick icon indicating copy to clipboard operation
react-slick copied to clipboard

Updating State Causes Slider go Back to Initial Slide

Open jennykortina opened this issue 9 years ago • 5 comments

Whenever I update the state/store (and it changes), the slider returns to the initial slide. Gist here:

https://gist.github.com/jennykortina/62c807f86e5a8bb50ff392018eb1231f

jennykortina avatar Mar 29 '17 22:03 jennykortina

I'm having the same issue using Redux-UI, anytime I call this.props.updateUI('currentImageIndex', currentSlide) it seems to reset to the initial slide about 50% of the time. I'm confused for sure!

tehviking avatar Apr 17 '17 21:04 tehviking

Also getting this.

barnc avatar Apr 26 '17 10:04 barnc

+1

ghost avatar May 03 '17 07:05 ghost

really annoying issue! quick fix before https://github.com/akiran/react-slick/pull/700 is merged in is to wrap the slider in a component that always checks for shouldComponentUpdate, i have mine returning false since my slider isn't dependent on any parent updates

ArcQ avatar Nov 28 '17 02:11 ArcQ

Issues related to this have been fixed in previous releases. Please feel free to request reopen if disagree.

laveesingh avatar Mar 28 '18 11:03 laveesingh