leecade / leecade/react-native-swiper

Dot does not work properly while rendering dynamic array components

Open
#720 25 comments 6 reactions 0 assignees View on GitHub

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
  1. set pagingEnabled true
  2. use map to render screens inside a Swiper
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.