0

I am having an issue with react-slick. I need to make it "swipe" on mobile. Unfortunately the swipeToSlide: true, which I found in the Documentation doesn´t seem to work.

Any solutions?

Here is a sample of my settings Code:

const settings = {
      dots: true,
      arrows: false,
      fade: true,
      swipeToSlide: false,
      infinite: false,
      slidesToShow: 1,
      slidesToScroll: 1,
      adaptiveHeight: true,
      speed: 200,
      customPaging(i) {
        return (
          <button
            className={`${questions[i].answer && 'active'}`}
            type="button"
          />
        );
      },
      responsive: [
        {
          breakpoint: theme.media.tablet,
          settings: {
            swipeToSlide: true
          }
        }
      ],
      beforeChange: (previous, next) =>
        this.setState({ oldSlide: previous, activeSlide: next }),
      afterChange: previous => this.setState({ activeSlide2: previous })
    };
Cœur
  • 37,241
  • 25
  • 195
  • 267

2 Answers2

1

If you set fade: true to fade: false it should work

0

If you set: swipe: true it should work