react-responsive-carousel icon indicating copy to clipboard operation
react-responsive-carousel copied to clipboard

autoPlay doesn't work when start (SP webpart)

Open EGBravo opened this issue 7 years ago • 14 comments

First of all, I've already checked this issue: https://github.com/leandrowd/react-responsive-carousel/issues/298

My problem is basically the same, autoPlay starts only when I click on an arrow. I'm using this component in a Sharepoint webpart with the following configurations:

showThumbs={false} onClickItem={this.click_item} showStatus={false} autoPlay={true} interval={2000} infiniteLoop={true} dynamicHeight={true}

Edit: I tried v3.1.46 and v3.1.47 and didn't worked, but v3.1.33 did

EGBravo avatar Mar 13 '19 12:03 EGBravo

I have the same problem & not work with stopOnHover

liuweiming1997 avatar Mar 20 '19 08:03 liuweiming1997

also I want to know how to play to first page if autoPlay gone to the end. ie endpage -> 1

liuweiming1997 avatar Mar 20 '19 08:03 liuweiming1997

I have the same issue where the carousel does not start rotating on page load. Is this fixed ? What's the workaround for this? i am using 3.1.47 version

Sujithkumara avatar Apr 08 '19 18:04 Sujithkumara

Same issue here. Any update on this?

webmuch avatar Apr 23 '19 13:04 webmuch

I am also facing the same issue. autoplay not working even in latest release which is 3.1.49 and yes, autoplay works in version 3.1.33 but when it comes to the last slide, it flips to the first one , scrolling backwards, navigating all the slides in between, which is not a very good user experience. Not sure, how it is working fine in Demos. :( Am I missing something here? please advise.

deepalijain1 avatar May 02 '19 07:05 deepalijain1

downgrading to 3.1.33 worked fine for me

govinddk4444 avatar Jun 20 '19 03:06 govinddk4444

As a workaround I resolved the issue by writing a jquery click event on the page load method.

Sujithkumara avatar Jun 20 '19 13:06 Sujithkumara

Even I had the same issue my package version was 3.1.49 , I then downgraded to 3.1.46 still the issue was not fixed. I get the data from API and then map it inside the Carousel . So I put a condition like until I get the data from api I'm not going to render the Carousel and it looks something like this, {this.state.banners.length > 0 ? ( //Here I added my Carousel and mapped the data and displayed the image. ) : null} And it fixed for me.

bhashmitha avatar Jul 02 '19 12:07 bhashmitha

@bhashmitha thank you sir!

louiscb avatar Jul 30 '19 10:07 louiscb

@EGBravo the problem occurs when you initialize the Carousel with no children. So don't init the Carousel unless you have children. It will solve the problem. You don't need to downgrade or anything like that.

er-nabin-bhusal avatar Sep 24 '19 07:09 er-nabin-bhusal

Thanks @bhashmitha and @nabinbhusal80

matheusmazeto avatar Nov 22 '19 16:11 matheusmazeto

setting the key of carousel to item.length works too

rardoz avatar Apr 06 '22 02:04 rardoz

Thanks, @bhashmitha your solution helped out.

codexive-zech avatar Aug 01 '22 11:08 codexive-zech

Thanks @rardoz , your solution helped me without downgrading or any of that

manan999 avatar Sep 09 '22 10:09 manan999