Skip to content
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

3.7.0 android , if set firstItem Greater than 4 or 5,the firstItem only display 4 #313

Closed
neilzhengzx opened this issue Apr 25, 2018 · 2 comments

Comments

@neilzhengzx
Copy link

neilzhengzx commented Apr 25, 2018

Is this a bug report or a feature request?

bug report

in android ,i use Carousel with 8 page, when i set firstItem 7, Carousel only go to 4 page.but in ios, Carousel go to the current page.

Have you read the guidelines regarding bug report?

yes

Have you read the documentation in its entirety?

yes

Have you made sure that your issue hasn't already been reported/solved?

yes

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

only in android

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

yes

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

yes

Have you been able to reproduce the bug in the provided example?

<Carousel
          ref={this.setViewPager}
          data={data}
          renderItem={this._renderPage}
          onSnapToItem={this.onChangePage}
          loop={true}
          firstItem={7}
          sliderWidth={pageWidth}
          itemWidth={pageWidth}
          slideStyle={{ width: pageWidth, height: pageHeight }}
          apparitionDelay={0}
          autoplay={false}
 />

i have 8 page in data.

Environment

Environment:
React: 16.2.0
React native: 0.53.3
react-native-snap-carousel: 3.7.0

Target Platform:
Android (8.0)

Steps to Reproduce

<Carousel
ref={this.setViewPager}
data={data}
renderItem={this._renderPage}
onSnapToItem={this.onChangePage}
loop={true}
firstItem={7}
sliderWidth={pageWidth}
itemWidth={pageWidth}
slideStyle={{ width: pageWidth, height: pageHeight }}
apparitionDelay={0}
autoplay={false}
/>
i have 8 page in data.
but in android, it goto 5 item;

Expected Behavior

Carousel should be in 8 item;

Actual Behavior

Carousel be in 5 item;

Reproducible Demo

its in my whole project, so cant give a demo.
Thanks.

@cklinx
Copy link

cklinx commented Apr 25, 2018

Same problem here. I think is a rendering issue cause if you set a big value in

initialNumToRender={50}

it render more objects list but rendering performance decrease; Even if you set

firstItem={49}

list show the 27 item.

@bd-arc
Copy link
Contributor

bd-arc commented May 3, 2018

@neilzhengzx @cklinx This is an unfortunate FlatList bug that has been referenced in #63, #159, #235, #261, #288, #302...

Take a look at this comment to learn more about the exact matter and to find out potential workarounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants