meliorence / react-native-snap-carousel

Swiper/carousel component for React Native featuring previews, multiple layouts, parallax images, performant handling of huge numbers of items, and more. Compatible with Android & iOS.
BSD 3-Clause "New" or "Revised" License
10.25k stars 2.26k forks source link

in iOS device loop not working #707

Open itenl opened 4 years ago

itenl commented 4 years ago

Is this a bug report, a feature request, or a question?

bug

Have you followed the required steps before opening a bug report?

(Check the step you've followed - put an x character between the square brackets ([]).)

Have you made sure that it wasn't a React Native bug?

not React Native bug

Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?

just iOS

Is the bug reproductible in a production environment (not a debug one)?

debug and release as same

Environment

Environment: React: 16.11.0 React native: 0.62.2 react-native-snap-carousel: 3.8.4

Target Platform: Android (6.0) iOS (13.4.1)

Expected Behavior

loop set true need normal

Actual Behavior

just only loop twice, can't continue to slide

Reproducible Demo

 <Carousel
          sliderWidth={screenWidth}
          sliderHeight={this.state.itemHeight}
          itemWidth={this.state.itemWidth}
          data={this.state.items}
          renderItem={this._renderBanner.bind(this)}
          firstItem={0}
          hasParallaxImages={true}
          inactiveSlideScale={0.932}
          inactiveSlideOpacity={this.state.opacity}
          loop={true}
          autoplay={true}
          autoplayDelay={500}
          autoplayInterval={3000}
          onSnapToItem={index => {
            this.setState({
              activeSlide: index
            });
          }}
        />

Steps to Reproduce

not steps

1. 2. 3.

thx~

tradebulls commented 3 years ago

+1

eduardoalba0 commented 3 years ago

+1

Thushar-Sreenivas commented 3 years ago

I also face the same issue

BertoGz commented 3 years ago

is anyone working on solving this issue as well? the looping seems to work going backwards... but not forwards. Im looking at the node modules code. it shouldn't be too hard to crack? Ill give it a shot.

BertoGz commented 3 years ago

to clarify does the looping work on android?

jfbn commented 3 years ago

It appears that this issue is still present. Looping works backwards, not forwards.

CrisPhuong commented 2 years ago

you can add loopClonesPerSide={5}

dohooo commented 2 years ago

Sorry, please allow me to advertise for my open source library! ~ I think this library react-native-reanimated-carousel will solve your problem. It is a high performance and very simple component, complete with React-Native reanimated 2