leecade / leecade/react-native-swiper

Index prop not working: (Android)

Open
#1,150 7 comments 2 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 ?

Android

Version

Which versions are you using:

  • react-native-swiper v1.5.14
  • react-native v0.61.5
Expected behaviour

swiper children have two items. I send index props 1 but 0. index open always

Actual behaviour

send to index props 1 open 1 slides.

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.

<Swiper index={sliderIndex} showsPagination={false} horizontal loop={false}>
  ...
</Swiper>
Steps to reproduce
  1. Swiper index prop 1
  2. Swiper start always 0 index

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 Android behavior using the Swiper example in the examples folder and the provided index={sliderIndex} snippet. Start by running the case with index set to 1, then trace how the index prop is applied when the swiper starts. Done means the second slide opens initially on Android with loop={false}.

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
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.