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

Commit e864dad

Browse files
satya164osdnk
andcommitted
fix: reset gesture when manually updating the index
The gesture amount is used to calculate the next index which can interfere with manual navigation. Similar to react-navigation/drawer#70 Co-authored-by: osdnk <micosa97@gmail.com>
1 parent 01ba66e commit e864dad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Pager.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ export default class Pager<T extends Route> extends React.Component<Props<T>> {
489489
cond(neq(this.nextIndex, UNSET), [
490490
// Stop any running animations
491491
cond(clockRunning(this.clock), stopClock(this.clock)),
492+
set(this.gestureX, 0),
492493
// Update the index to trigger the transition
493494
set(this.index, this.nextIndex),
494495
set(this.nextIndex, UNSET),

0 commit comments

Comments
 (0)