React-native-snap-carousel: 1st Item on IOS

Created on 26 Mar 2019  路  10Comments  路  Source: meliorence/react-native-snap-carousel

IOS bug

First item in the carousel doesn't show until the next item is clicked.

contribution? reproduction?

Most helpful comment

@phonganhhung9xtb Setting
removeClippedSubviews={false}

solved the issue.

All 10 comments

鈿狅笍 You did not follow the contributing guidelines!

As stated in these:

You need to fill out the issue template completely. This step is mandatory! Not doing so will result in your issue getting closed. Don't take this personally if this happens, and feel free to open a new issue once you've gathered all the information required by the template.


Unless you provide a Snack example in which the issue can be reproduced, as well as a complete description of everything you've tried, we won't be able to help you and the thread will be closed.

+1 me too, how to resolve?

@phonganhhung9xtb Setting
removeClippedSubviews={false}

solved the issue.

Also had this issue. The workaround from @ameernormie works, however I suspect there is a performance cost as the out-of-bounds native views won't be clipped.

For what it's worth, I was having this problem and then I realized that it was styling-related. the Carousel needed a style to show the items: contentContainerCustomStyle={{alignItems: 'center', justifyContent: 'center'}}

Where are you adding removeClippedSubviews={false}? The the carousel itself? This does not solve the issue for me.

@bd-arc, here is a Snack that reproduces the issue: https://snack.expo.io/@thekevinbrown/snap-carousel-first-item-bug

Expected: Page should load with green item and "YES ME, I SHOULD BE FIRST"
Actual: Page loads with red item saying "Not Me" and it takes quite a bit of scrolling in order to get to the green item.

Like @lpfunding, @ameernormie 's workaround of setting removeClippedSubviews={false} on the Carousel does not seem to change the behaviour.

@ameernormie's workaround did the trick for me, but we should be able to remove the clipped subviews for better performance.

@alexandrecanuto yes absolutely. This should be resolved through proper methods

gosh, this answer actually saves my time

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sujitpk-perennial picture sujitpk-perennial  路  3Comments

Dr1992 picture Dr1992  路  4Comments

ajonno picture ajonno  路  4Comments

akyker20 picture akyker20  路  3Comments

wkwyatt picture wkwyatt  路  4Comments