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

Commit dbb683d

Browse files
authored
Revert "fix: move onIndexChange (#1384)"
This reverts commit 4616336.
1 parent 4616336 commit dbb683d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/PanResponderAdapter.tsx

+1-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,6 @@ export default function PanResponderAdapter<T extends Route>({
8181

8282
const { timing, ...transitionConfig } = DefaultTransitionSpec;
8383

84-
onIndexChangeRef.current(index);
85-
8684
Animated.parallel([
8785
timing(panX, {
8886
...transitionConfig,
@@ -91,6 +89,7 @@ export default function PanResponderAdapter<T extends Route>({
9189
}),
9290
]).start(({ finished }) => {
9391
if (finished) {
92+
onIndexChangeRef.current(index);
9493
pendingIndexRef.current = undefined;
9594
}
9695
});

0 commit comments

Comments
 (0)