Siddaling GK
Siddaling GK

Reputation: 1

React slick slide not clickable

I am using react slick for making slides of poll. I am facing issue while clicking the poll option. Click gets fired after two clicks.

I think touch start is the issue here.

Upvotes: 0

Views: 881

Answers (1)

Amirhossein
Amirhossein

Reputation: 2047

Not sure if it's like your code but the console logs the text when I click on the first image:

const ReactSlick = (props) => {
  var settings = {
    dots: true
  };
  return (
    <div className="container">
      <Slider {...settings}>
        <div>
          <img onClick={() => console.log("Clicked !")} src="http://placekitten.com/g/400/200" />
        </div>
        <div>
          <img src="http://placekitten.com/g/400/200" />
        </div>
      </Slider>
    </div>
  );
}
```;

Upvotes: 0

Related Questions