leecade / leecade/react-native-swiper
onIndexChanged does not get called after swiping
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 10.5k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
Which OS ?
iOS and Android
Version
Which versions are you using:
- react-native-swiper v1.5.14
- react-native v0.60.5
Expected behaviour
onIndexChanged gets called twice and in order when I swipe, release, and quickly swipe again.
Actual behaviour
onIndexChanged only gets called once (with the latest index) when I swipe, release, and quickly swipe again, therefore skipping one of the indexes in my swiper and messing up my state.
Steps to reproduce
- Make a swiper with three elements.
- Start at the first element, swipe to the second one, quickly release finger and swipe again to the third one.
- Log the
onIndexChangedresults to see how the middle index (1) gets skipped.
Contributor guide
No contributing guide indexed for this repository
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 with a three-element swiper on iOS and Android using react-native-swiper v1.5.14 and React Native v0.60.5. Reproduce the rapid swipe from index 0 to 1 to 2 while logging onIndexChanged, then trace the event handling that produces the callback. Done means the callback reports both intermediate and final indexes in order.
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
- Clearly specified
- Newbie friendliness
- 42/100