-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Open
Labels
Description
Bug report (iOS)
criteria :
data is dynamic (like I got an initial length of 1, but the length gonna be change to 5 after 1 sec), and the loop is on.
behaviour:
after the number of rendered images changes, the carousel (gonna scrollTo) gonna render the last image, then the first again. (like it's not sure what to do).
possible workaround:
adding a key={data.length} to the Carousel, but of course that gonna destroy, and remount the component what is heavy and cause flickering.
<Carousel
loop
data={urls}
renderItem={this._renderItem}
slideStyle={{ width: viewportWidth }}
sliderWidth={viewportWidth}
itemWidth={viewportWidth}
inactiveSlideOpacity={1}
inactiveSlideScale={1}
onSnapToItem={this.onSnapToItem}
activeSlideAlignment="center"
/>
Environment:
React: 16.7
React native: 0.57.4
react-native-snap-carousel: 3.7.5
Target Platform:
iOS (12.1)