meliorence / meliorence/react-native-snap-carousel
firstItem not working on Android
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?
- [x ] I have read the guidelines regarding bug report.
- [ x] I have reviewed the documentation in its entirety, including the dedicated documentations 📚.
- [ x] I have searched for existing issues and made sure that the problem hasn't already been reported.
- [ x] I am using the latest plugin version.
- [ x] 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?
yes
Is the bug specific to iOS or Android? Or can it be reproduced on both platforms?
Android
Is the bug reproductible in a production environment (not a debug one)?
yes
Environment
Environment:
React: 16.0.0-beta.5
React native: 0.51
react-native-snap-carousel: 3.3.4
Target Platform:
Android (6.0)
iOS (11)
-->
(Write your answer here.)
Expected Behavior
scroll to item number specified in firstItem
Actual Behavior
does not scroll
Reproducible Demo
- use firstItem on android.
This might be related to https://stackoverflow.com/questions/33208477/react-native-android-scrollview-scrollto-not-working
I fixed it when using scrollTo in my component in a hacky way by introducing a 200ms delay or so 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
Start by reproducing the Android 6 case with firstItem, then inspect the carousel's firstItem and scrollTo handling, including the reported Android timing behavior. Done means the carousel initially scrolls to the requested item on Android without a caller-side delay, while existing iOS behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react-native
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100