Skip to content
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

Merged
merged 1 commit into from
Apr 15, 2019

Conversation

celdrake
Copy link

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

Copy link

@peltos peltos left a 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!

@alexsenichev
Copy link

Approve it!

@HuntBurdick
Copy link

This is a major issue for me..

@mehdi-cit
Copy link

Hello folks,
This change/fix is much needed but it has not been integrate it with the project (the code is few months old).
Is there a fork we can use instead of this "akiran/react-slick". Or a I missing something?

mehdi-cit added a commit to mehdi-cit/react-slick that referenced this pull request Dec 5, 2018
Fix described in "akiran#1423" works for me but has not been integrated with
@maddhruv maddhruv added the P1 label Dec 6, 2018
@maximus-lynn
Copy link

Why are you not merging this?

This is effecting my project and I'l likely pull this dependency if you don't fix it.

simkesd added a commit to simkesd/react-slick that referenced this pull request Dec 24, 2018
@iamdcj
Copy link

iamdcj commented Jan 7, 2019

This is effecting my project and I'l likely pull this dependency if you don't fix it.

I am in the same situation. 😕

@davidwding
Copy link

Just wanted to add support for merging this in - it fixed a big headache for me as well.

Copy link

@ignaciogrondona ignaciogrondona left a 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.

Copy link

@franciscoaguirre franciscoaguirre left a 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

@ovsw
Copy link

ovsw commented Feb 25, 2019

Please merge!

@ovsw ovsw mentioned this pull request Mar 5, 2019
@piovischioh
Copy link

Guys, we could use patch-package to fix it for instant.
Here is my react-slick+0.23.2.patch.

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,

@luke-underwood
Copy link

@akiran can you please merge this?

@akiran akiran merged commit 2b7e78c into akiran:master Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

asNavFor skipping certain items