leecade / leecade/react-native-swiper

swiper滑动到其他页面,此时通过请求后台接口改变swiper中的数据;再次滑动页面时,swiper的index出现负值;请问如何重新设置index,期望每次能够设置swiper的index从0开始

Open
#672 1 comment 0 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 ?
Version

Which versions are you using:

  • react-native-swiper": "^1.5.12
  • react-native": "0.48.2
Expected behaviour
Actual behaviour
How to reproduce it>

To help us, please fork this component, modify one example in examples folder to reproduce your issue and include link here.

Steps to reproduce

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

Start by reproducing the reported negative swiper index with react-native 0.48.2 and react-native-swiper 1.5.12. Modify an example in the examples folder as requested, using the described data change through a backend request. Done means the reproduction is understood and the swiper index reliably resets to 0 after its data changes.

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
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.