-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
I have only one slide and its replicate the inner content three times #2387
Comments
I think it's the same issue as #2337 |
any update aboyt this issue?? |
in version 0.30.2, it's still the same. |
I've switched to using another library. |
me too. have the problem. X 3 |
adaptiveHeight: true is alternative bug |
No, it's not the same issue.
Yes, it fixes the problem. To avoid this strange behavior use a dynamic condition in "infinite" property: const ImageSlider = ({ slides }) => {
const settings = {
infinite: slides.length > 1,
// other setting's properties
}
return (
<div className="slider-container px-8">
<Slider {...settings}>
{slides.map((slide, i) => (
<div key={i}>
{slide}
</div>
))}
</Slider>
</div> |
here is settings:
const settings = { dots: true, infinite: true, speed: 500, slidesToShow: 1, slidesToScroll: 1, };
and slider code:
<Slider {...settings}> <div> <h3>1</h3> </div> </Slider>
Output:
The text was updated successfully, but these errors were encountered: