-
-
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
double items showed #1171
Comments
Hi, when can I wait for the react-slick npm update according to these issue?) |
Is there any workaround until you update this? |
I faced with same bug, my temporary fix:
|
I'm having the same issue, @SnowDiamond's solution helped, but to give more info about this issue, I belive it happens if item number is smaller then slidesToShow |
* fixed a bug related to unslick fixes: akiran#1172 * fixed postclones in case of unslick fixes: akiran#1171 * js * css * image/video js * images
You can create a state for infinite, and check if your array is big enough to put infinite on true:
|
I am experiencing this problem but finding that it occurs unless the slides to show number is smaller than the item length |
The solution provided by SnowDiamond should work. |
infinite false can do the job |
A potential quick-fix, but not a solution for the problem. |
I have something like this for the workaround:
|
It's 2020 already, just fix it. |
I got the same problem . :(. |
Got this error and it took me precious nights to see this quick workaround provided by SnowDiamond. @React-Slick |
If you are using typescript and defining the type of children as ReactNode you will get an error when using I solved this by using the following:
But agree surely a fix can be put in for this? |
This problem is there for me even with |
There's also another problem - What happens if there's a different value for We would have to verify the current breakpoint and then access the |
@LauraBeatris did you happen to find a workaround for this specific problem? |
Information about |
infinite: items.length > 3 |
I have to sign in to like your comment. LoL. It saved my time. |
I tried implementing the items.length solution but it didn't work on my end; the Update: On second thought, I just decided to try to remove the DOM node of the
This works! And I can now just put infinite to true lol |
Thanks everyone, SnowDiamond's solution above worked for me. Does anyone know when we would be getting a permanent fix to this. |
I also have the same problems above , just fix it !!! please |
Thanx its work |
not working |
In my case, it was due to dynamically changing data.
So I added a condition:
|
2023 and still running into this issue—thank you @SnowDiamond for the workaround! |
Hi. I am running into a similar problem. If you set infinite to true it is duplicating the slides. I have noticed that slick carousel doesn't seem to have the same duplicate problem as react slick. The issue is making it to where I am unable to make a video play when it is shown without a duplicate copy playing in the background. The id/ref/index used are duplicated with the originals which causes the shown video to play as well as the one that is hidden and never seen. Is there any fix yet to prevent duplicate slides from being created when infinite scroll is true? I've tried everything to work around the issue. |
same in 2024 |
const settings = useMemo(() => {
|
I faced with same bug. Thanks @SnowDiamond for the work around. |
Add - adaptiveHeight: true in sliders settings. |
faced with same bug |
SliderProps: {
slidesToShow: 2,
infinite: true,
}
With these props if you pass to the slider only 1 item, it will show cloned one under the first slide.
The text was updated successfully, but these errors were encountered: