react-slick
react-slick copied to clipboard
Slide as link element is always clicked on the last element.
const settings = {
dots: true,
infinite: true,
speed: 500,
slidesToShow: 1,
slidesToScroll: 1,
autoplay: true,
autoplaySpeed: 1500,
**fade: true, // because of this**
}
[
{url: '/images/1_banner.jpg'},
{url: '/images/2_banner.jpg'},
{url: '/images/3_banner.jpg'},
].map((image) => {
return (
<Slider {...settings}>
<a href={image.url}>
<img src={image.url} alt={image.url} />
</a>
</Slider>
)
When I click on any slide it always goes to '/images/3_banner.jpg'
it happens to me 2... It's weird and i hope this can be fixed
Hey guys. Having this problem here too. Had to work around the issue. Here's a small snippet that at least solves the problem for now:
.slick-slide:not(.slick-active) {
pointer-events: none;
}
thanks @guitassinari sharing. I solved this same problem.