Open jpunith opened 7 years ago
I use 1.8.0, have the same issue.
I see this same issue. And since we are doing some custom positioning of content with flexbox. the extra <div>
causes layout issues.
The comment linked by @gserrg is very interresting. A quick (temporary) fix is to add "rows: 0" to the options of your slick slider.
Here is an example of mine :
$('.slick-frontpage').slick({
dots: false,
arrows: false,
slidesToShow: 1,
slidesToScroll: 1,
infinite: true,
rows: 0 // Fix vor v1.8.0-1
});
@gserrg Thanks man for quick fix
works like a charme
You just saved my life
O! Thanks man!
Anyone using @pierre-r solution for React Slick? It crashes when setting rows:0
rows: 0
Great, thank you. This also solved the white padding issue at the bottom
The comment linked by @gserrg is very interresting. A quick (temporary) fix is to add "rows: 0" to the options of your slick slider.
Here is an example of mine :
$('.slick-frontpage').slick({ dots: false, arrows: false, slidesToShow: 1, slidesToScroll: 1, infinite: true, rows: 0 // Fix vor v1.8.0-1 });
--It's work-- that's crazy man!
thank you
Hmm, when I set rows to 0 my whole React application fails to load. Is there something wrong with how I'm doing it or does this work around no longer work?
const defaultSettings: Settings = {
dots: false,
infinite: true,
centerMode: true,
slidesToShow: 1,
slidesToScroll: 1,
speed: 2000,
autoplay: false,
autoplaySpeed: 2000,
nextArrow: <NextNavArrow />,
prevArrow: <PrevNavArrow />,
rows: 0, //see https://github.com/kenwheeler/slick/issues/3207
responsive: [
{
breakpoint: 950,
settings: {
slidesToShow: 1,
slidesToScroll: 1,
initialSlide: 1,
centerMode: false,
}
}
]
}
rows: 0 //
same is happening with me, any idea how to fix it?
my app crashes when i do rows: 0 any fix?
My react-app is crashing if I pass the prop rows:0
. Any solution or fix?
any fix for this versions "react-slick": "^0.30.2", "slick-carousel": "^1.8.1",
When i used slick.js 1.8.1 unminifed file: https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.js
I got two extra div when i inspect.
<div class="slick-slide slick-current slick-active" data-slick-index="0" aria-hidden="false" style="width: 153px;"> <div> <div class="step" style="width: 100%; display: inline-block;"> <h3>1</h3> </div> </div> </div>
hear is the js fiddle https://jsfiddle.net/cz5nds1e/
Now When i use minifed file of the version 1.8.1 https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.8.1/slick.min.js
when i inspect there is no extra div
<div class="step slick-slide slick-current slick-active" style="width: 153px;" data-slick-index="0" aria-hidden="false" tabindex="0"> <h3>1</h3> </div>
hear is the js fiddle https://jsfiddle.net/offzcn8s/
When i debugged this issue i got to know that in minifed file a function 'buildRows' as this condition below
l.options.rows > 1
and in unminifed file this condition_.options.rows > 0