-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing issue with asNavFor not detecting all slide changes #1423
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed my problem!
Approve it! |
This is a major issue for me.. |
Hello folks, |
Fix described in "akiran#1423" works for me but has not been integrated with
Why are you not merging this? This is effecting my project and I'l likely pull this dependency if you don't fix it. |
Got the fix from here akiran#1423
I am in the same situation. 😕 |
Just wanted to add support for merging this in - it fixed a big headache for me as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed my issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fixed the issue for me
Please merge! |
Guys, we could use patch-package to fix it for instant. patch-package
--- a/node_modules/react-slick/lib/inner-slider.js
+++ b/node_modules/react-slick/lib/inner-slider.js
@@ -410,7 +410,7 @@
});
onLazyLoad && slidesToLoad.length > 0 && onLazyLoad(slidesToLoad);
_this.setState(state, function () {
- asNavFor && asNavFor.innerSlider.state.currentSlide !== currentSlide && asNavFor.innerSlider.slideHandler(index);
+ asNavFor && asNavFor.innerSlider.state.currentSlide !== _this.state.currentSlide && asNavFor.innerSlider.slideHandler(index);
if (!nextState) return;
_this.animationEndCallback = setTimeout(function () {
var animating = nextState.animating, |
@akiran can you please merge this? |
When the slider has the "asNavFor" configuration, the detection of the slide changes from one slider to the next does not always work. It might work always, or in other occassions, only on every other change.
The issue is that the second slider needs to be refreshed when the slide it points to is different to that of the parent slider, after this parent slider has updated.
This should fix #1416