meliorence / meliorence/react-native-snap-carousel
[Android] The first item is displayed incorrectly if you set the render from the end
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?
This is a bug report.
Have you followed the required steps before opening a bug report?
(Check the step you've followed - replace the space character between the square brackets ([]) by an x.)
- I have read the guidelines regarding bug report.
- I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- I have searched for existing issues and made sure that the problem hasn't already been reported.
- I am using the latest plugin version.
- I am following the issue template closely in order to produce a useful bug report.
Have you made sure that it wasn't a React Native bug?
I'm sure that it's not a problem with RN.
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
The bug specific for Android.
Is the bug reproductible in a production environment (not a debug one)?
I think that the environment is not affected by this bug.
Environment
Environment:
React: 16.8.3
React native: 0.59.8
react-native-snap-carousel: 3.7.5
Target Platform:
Android (5.0)
Expected Behavior
I expect that at any length of the array with data, if I specify that the last element of the array should be rendered first, then the last element will be rendered
Actual Behavior
When I set that the first element should render the last element of the array and the array with data consists of 8 elements, the last element render the penultimate element(that is, 7). If the array with data will increase, the render will not be the penultimate,and the second from the end and then the third and so on.
Reproducible Demo
You can check it on your example from your repository. Just add a few elements to the data array (so that there are at least 8 elements in the array) and set the last element of the array to be rendered as the first element.
https://snack.expo.io/S1mbQwuhN
Steps to Reproduce
1 Just add a few elements to the data array (so that there are at least 8 elements in the array)
2 set the last element of the array to be rendered as the first element.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in the repository example or the linked Expo Snack by expanding the data array to at least eight items and configuring the last item to render first. Compare Android's first rendered item with the expected last array element. Done means the last item renders first for arrays of the reported lengths without regressing the carousel behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100