-
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
Removing last item from carousel results in an empty space (Android) #623
Comments
I have the same issue, a quick workaround I used was scrolling to the previous item after deleting. |
Hi, I have the same problem, can you explain more your solution @DiegoMac95 please |
Hello, we have the same issue here, could you provide us any detailed informations ? |
@askemeline When I delete an element from the carousel, I also use snapToPrev method to scroll to the previous element, manually doing what the carousel does in iOS, that deletes the empty space. |
Thanks for your response but I don't really understand when you use it without the onPress. I would like that android do it automatically when I delete the last element :/ |
@askemeline that's why you need to add the reference like this
You don't actually need to use 'onPress', you can call the method anywhere in your component using that reference |
Thanks for your answer but I have still the bug :/ |
My bad, is working, many thanks @DiegoMac95 :) |
What can I do if I have enableSnap={false}? |
This comment was marked as spam.
This comment was marked as spam.
Any updates on this? Still facing this issue. |
Is this a bug report, a feature request, or a question?
Bug report
Have you followed the required steps before opening a bug report?
Have you made sure that it wasn't a React Native bug?
Yes as far as possible.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Android
Is the bug reproducible in a production environment (not a debug one)?
Yes - it presents in a live version of our app
Environment
react-native-snap-carousel: 3.8.4
react-native@0.60.5
Android 9
Expected Behavior
When removing the last item from the data I expected the carousel to display the next available item as it does with start and middle list items and as it does on iOS.
Actual Behavior
An empty space is displayed
Reproducible Demo
https://snack.expo.io/@danjvee/react-native-snap-carousel-item-remove-bug---android
Steps to Reproduce
The text was updated successfully, but these errors were encountered: