meliorence / meliorence/react-native-snap-carousel

Removing last item from carousel results in an empty space (Android)

Open
#623 11 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
10.5k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

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
  1. Preview the code on Android
  2. Scroll right to the last item in the carousel.
  3. Tap the item delete button
  4. Observe the empty space

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Run the linked Expo reproducible demo on Android and follow the listed steps: scroll to the last carousel item and use its delete button. Compare the result with deleting start or middle items and with iOS behavior; done means the next available item is displayed instead of an empty space.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.