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

slickPlay & slickPause not working #1209

Open
intositeme opened this issue Apr 27, 2018 · 4 comments
Open

slickPlay & slickPause not working #1209

intositeme opened this issue Apr 27, 2018 · 4 comments

Comments

@intositeme
Copy link

https://codesandbox.io/s/v8rxn7qwp7

The slickPlay & slickPause does not seem to be working.
Used the example codes from https://react-slick.neostack.com/docs/example/auto-play-methods

@xlasserre
Copy link

I'm experiencing the same behavior. Cannot pause the autoplay.

@trivopr
Copy link

trivopr commented Jul 30, 2018

I have the same issue, can not pause when autoplay

@patmellon
Copy link

I'm dealing with the same issue, but I found a potential solution:

play() {
  this.slider.innerSlider.autoPlay("play");
}
pause() {
  this.slider.innerSlider.pause("paused");
  this.slider.innerSlider.autoPlay("hovered"); 
// The above autoPlay function probably isn't necessary if you're using onClick events, 
// and it will only work if you keep the default prop pauseOnHover set to true.
}

Use the above functions in place of the ones from the docs example.

@denishrana09
Copy link

try this:

setTimeout(() => {
        this.pause();
});

so that, after slider initialized, this will be called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants