SEE: https://github.com/akiran/react-slick/issues/85
I am changing the route using <Link> (provided by react-router), but when doing so it keeps the slider on the currentSlide (Even though the slider's data changes).
SEE: https://github.com/akiran/react-slick/issues/100
Perhaps there is a middle ground between all of these related issues to enable reseting currentSlide: 0?
Yep, I am facing the same issue here.
+1
is there no one still solve this problem?
+1
Should have an option to let currentSlide reset to 0 when the Slider component updates
first
second
componentWillReceiveProps(nextProps) {
if(this.props.~~ != nextProps.~~) {
this.setSlideRest(this);
}
}
setSlideRest(obj) {
obj.refs && obj.refs.slider && obj.refs.slider.slickGoTo(0);
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Most helpful comment
first
second
componentWillReceiveProps(nextProps) {
if(this.props.~~ != nextProps.~~) {
this.setSlideRest(this);
}
}
setSlideRest(obj) {
obj.refs && obj.refs.slider && obj.refs.slider.slickGoTo(0);
}