leecade / leecade/react-native-swiper

Swiper works abnormal when removing last page then scroll

Open
#626 0 comments 1 reaction 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 and Android

Version

Which versions are you using:

  • react-native-swiper v1.5.13
  • react-native v0.48.4
Expected behaviour

When removing the last page from swiper, then scroll, should work as normal.

Actual behaviour

When removing the last page from swiper, then scroll, swiper will skip page which caused by incorrect internal offset.

How to reproduce it>

E.g. Swiper has 5 pages, scroll to the last page (index=4), then remove the last page from swiper, so the page whose index = 3 becomes the new last page. Scroll from left to right, index = 1 shows up instead of index = 2 page.

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 on iOS or Android with react-native-swiper v1.5.13 and React Native v0.48.4 using five pages. Start by tracing the swiper's internal offset after removing the page at index 4; done means scrolling after the removal shows index 2 rather than skipping to index 1.

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.