leecade / leecade/react-native-swiper
Dot does not work properly while rendering dynamic array components
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 11.2 / android 7.0
Version
Which versions are you using:
- react-native-swiper v1.5.13?
- react-native v0.52.1?
Expected behaviour
pagination active dot will be placed according to the current screen index of swiper while rendering
Actual behaviour
while rendering dynamic components(eg. rendering screens in an array or use map) active dot will remain at the initial position no matter which current swiper screen is active
How to reproduce it>
while rendering dynamic components(eg. rendering screens in an array or use map) active dot will remain at the initial position no matter which current swiper screen is active
Steps to reproduce
- set pagingEnabled true
- use map to render screens inside a Swiper
- try to swipe the screens and the active dot below remains the same position
PS: I tried to use onMomentumScrollEnd and onIndexChanged to monitor the index changes but neither works in the given situation. But when you use rendering static component then anything works just fine.
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
Reproduce the issue with react-native-swiper v1.5.13 and React Native 0.52.1 using pagingEnabled and screens rendered from an array or map. Compare this with statically rendered screens while observing onMomentumScrollEnd and onIndexChanged. Done means the pagination active dot follows the current screen in the dynamic-rendering case and the index callbacks 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
- 45/100