leecade / leecade/react-native-swiper

Index is invalidation when loop prop be set 'true'

Open
#1,243 0 comments 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 ?

Windows 10

Version

Which versions are you using:

  • react-native-swiper v1.6.0
  • react-native v0.63.3
Expected behaviour

I set the swiper prop loop={true}. and the index={0}.And I use an array that should makes up the rendering elements.
The swiper should show the first element of the array. And I should be able to get the last element of the array by swipe right.

Actual behaviour

The swiper initial slide the last element of the array and I can not swipe right, the loop prop is invalidation too.
But if I set loop={false} the swiper initial the first element correctly.

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.6.0 and React Native v0.63.3 using an array, index={0}, and loop={true}. Verify that the first element is shown initially and that swiping right reaches the last element; loop={false} provides the comparison behavior.

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.