mirror of
https://github.com/zhigang1992/react-native-bottom-sheet.git
synced 2026-04-28 20:25:36 +08:00
chore: reset currentGesture after transition finishes
This commit is contained in:
@@ -373,8 +373,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
|
||||
and(
|
||||
eq(tapGestureState, State.FAILED),
|
||||
eq(currentGesture, GESTURE.CONTENT),
|
||||
eq(contentPanGestureState, State.END),
|
||||
eq(handlePanGestureState, State.END),
|
||||
neq(position, 0)
|
||||
),
|
||||
call([], () => {
|
||||
|
||||
@@ -53,7 +53,7 @@ export const useTransition = ({
|
||||
snapPoints,
|
||||
initialPosition,
|
||||
}: TransitionProps) => {
|
||||
const currentGesture = useValue<GESTURE>(0);
|
||||
const currentGesture = useValue<GESTURE>(GESTURE.UNDETERMINED);
|
||||
const currentPosition = useValue(initialPosition);
|
||||
|
||||
const isPanningContent = eq(contentPanGestureState, State.ACTIVE);
|
||||
@@ -83,6 +83,7 @@ export const useTransition = ({
|
||||
|
||||
const finishTiming = useMemo(
|
||||
() => [
|
||||
set(currentGesture, GESTURE.UNDETERMINED),
|
||||
set(shouldAnimate, 0),
|
||||
set(currentPosition, config.toValue),
|
||||
set(animationState.frameTime, 0),
|
||||
|
||||
Reference in New Issue
Block a user