Having an issue with the imperative API calls setPage, incrementPage, and decrementPage. When the initialIndex is set to a value greater than 0, these methods seem to increment or decrement the page number by the value of initialIndex rather than by 1. This behavior is unexpected and seems to be a bug on both iOS and android.
When I use swipe gesture, it works fine.
Expected Behavior
The page number should increment or decrement by 1, regardless of the initialIndex value when we use Imperative API calls.
Description
Having an issue with the imperative API calls
setPage
,incrementPage
, anddecrementPage
. When theinitialIndex
is set to a value greater than 0, these methods seem to increment or decrement the page number by the value ofinitialIndex
rather than by 1. This behavior is unexpected and seems to be a bug on both iOS and android.When I use swipe gesture, it works fine.
Expected Behavior
The page number should increment or decrement by 1, regardless of the
initialIndex
value when we use Imperative API calls.Code to reproduce
How issue look likes
https://github.com/computerjazz/react-native-infinite-pager/assets/29123342/a9eadef6-5fb2-40bd-85eb-3abbb33245c0