meliorence / meliorence/react-native-snap-carousel
onSnapToItem wrong Index (RTL mode, Android)
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
when using RTL or inverted , what happen is , it invertes the indices as well, so if the data array is [0,1,2,3,4] becomes [4,3,2,1,0] , which is wrong , because despite the fact the carousel showing the layout in LTR or RTL fashion, the index should be the same!
also trying to disable inversion using inverted={false} not working, any suggestions here?
EDIT: only happens on Android
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 on Android with RTL and inverted carousel settings, then trace how onSnapToItem derives its index. Verify that callbacks preserve the original data-array ordering and that inverted={false} disables inversion; the issue is done when these cases behave consistently.
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
- 35/100