Skip to content
This repository has been archived by the owner on Nov 27, 2022. It is now read-only.

Fix: animated position and offset to be in sync with active page index #1312

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/PagerViewAdapter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ export default function PagerViewAdapter<T extends Route>({
onPageSelected={(e) => {
const index = e.nativeEvent.position;
indexRef.current = index;
position.setValue(index);
offset.setValue(0);
onIndexChange(index);
}}
onPageScrollStateChanged={onPageScrollStateChanged}
Expand Down