-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Carousel blank when changing tab for the first time. Will appear after first scroll. #238
Comments
I have the same problem but i am not using expo. Environment |
Hi @afirulaf, This is probably the same issue as #225, but you were kind enough to follow the contributing guidelines, which means I have a starting point to work with ;-) Unfortunately, I think it has to do with how the I'll let you know when it's done so we can find out if it solves the issue. |
I had the same problem |
adding removeClippedSubviews={false} resoved my problem, thx |
Hi guys, Here are a bunch of related React Native issues:
This clearly shows an issue with the The I'm pretty positive that using a We won't be able to have the best of both worlds until Facebook does something about it. Since all related issues have been closed while no real solution has been provided, I'm a bit worried :-( I'll see what I can do about implementing a custom hacky method to be called whenever needed (something along those lines, if it still works). |
You may want to try out branch Here is the associated description:
My hope is that calling this on every tab change will solve your issue... |
@afirulaf @owen12ab @Guodadada Hey guys! Have you been able to try out the proposed fix? |
I had this issue and tried the fix. Only testing in the iOS emulator for now, so it’s a limited test, but it seems to force the FlatList to render the item on the left by causing a rapid scroll of the content. It works, but also looks like a glitch — sometimes barely noticeable, sometimes a bit invasive. Is that close to what you were expectig @bd-arc ? I understand that it’s a hackish workaround, so if that’s the intended behavior then all is well. ^^ |
Closing as no further feedback was provided. |
Hi. I’m working on different parts of the application these days but I’ll update if I have more information. |
Happy to report the glitchy behavior I was seeing was not a problem with this lib. |
Glad to hear that @fvsch! And thank you for reporting back ;-) |
This issue still exists.. on iPhone 8 Plus the carousal shows up blank. |
@spotsadmin As you've probably understood, this is a As a temporary workaround, you can set I'm currently fed up with the |
Expo: 29.0.0 Have tried:
Issue still persists unfortunately. |
@evertlund same behavior in here. React 16.5.0, @bd-arc this issue should not be closed I think. |
@kondratk Unfortunately, this is a RN issue so there is nothing we can do about it. This is why I think that keeping this thread opened would be misleading. Anyway, have you tried adding |
i‘m work. add this prop~ thx |
Using removeClippedSubviews={false} also worked for me. |
Using I say that - the hack is imperceptible to me, but we'll see if it gets through QA. 🤞 So do these FlatList problems persist in RN 0.60 too? |
For configuration "react-native": "0.61.1",
|
Hi, I also ran into this problem. I leave my approach: pd: I also have to make a request with the infinite pagination! Regards |
@MauroTaliente Thank you for sharing your approach! We should definitely start using hooks within the component itself. Would you be up for the task of migrating it? Also, do not hesitate to create a PR for the infinite pagination; it looks pretty good! Bonus point if you can make it look like the one seen in #369 ;-) |
@bd-arc Is there any workaround this? The same described is happening to my app when changing tabs. Sometimes is a barely noticeable fast scroll to the left and back to the center, sometimes is more apparent . |
I love you |
Thanks!!! |
yeah, it works |
It works for me. Thank you so much |
Worked for me after one hour of research! Thank you! Should be added in the common issues :) |
Tags for people like me who try to find this issue in the huge number of other issues:
|
@Guodadada You saved my life! 🚀🚀🚀 |
Worked on RN 0.61.5 |
I had this problem particularly when I was changing the amount of items into the carousel. For example n to >n, my workaround was to use this method ref.snapToItem(x). |
I have a bug like 'end of loop' in Android if I start scrolling faster the card-by-card. But 'loop={true}'. And in iOs - all good. I read all of the documentation, and a lot of issues but didn't find a good solution that solve my problem.. Have some found a good way? here is my Carousel: <Carousel |
I also had this issue. My snap carousel was rendering items fine on the first render. But whenever I changed the list to have items less than the current snapped index (focused item on list). I had a blank section. It's a bit strange because my component was re rendering and snap carousel should have reset the snapped index when list changed. I had to use ref.snapToItem(0) whenever props changed inside useEffect. |
To tell U the truth - after a lot of combinations to solve that behavior, I wrote my code which carousel functions perfectly. And I didn't use that lib. |
Is this a bug report or a feature request?
Bug report
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?
iOS
Is the bug reproductible in a production environment (not a debug one)?
Yes
Have you been able to reproduce the bug in the provided example?
Yes
Environment
Expo: 24
React: 16.0.0
React Native: 0.51
react-native-snap-carousel: 3.4.0
react-navigation: 1.0.0-beta.21
Steps to Reproduce
Expected Behavior
Carousel appear normally.
Actual Behavior
So I have multiple carousel on multiple tab. I use react-navigation tabnavigator. On my first screen I have two carousel, and on my second screen I have another carousel. When I run my app, the carousel on the first screen works as expected. But when I change tab to my second screen, the carousel is there, but its blank. I can see it occupying the space for its height but nothing appear there. But when I scroll the page, or I scroll horizontally the area where I expect my carousel to be, it appear. I tested it on newly created snack, the same thing occur. Check my example snack below. This only happen in iOS, on Android its working fine.
Reproducible Demo
Open this snack on iOS, or use expo snack emulator. After load, change tab.
https://snack.expo.io/@afirulaf/carousel-snap-bug
The text was updated successfully, but these errors were encountered: