From c84cbbc0d3101ad067b6490301c29fade387e9c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ignacy=20=C5=81=C4=85tka?= Date: Mon, 29 Jul 2024 11:10:13 +0200 Subject: [PATCH] use enabled prop to set enable or disable pan gesture --- src/components/ReanimatedSwipeable.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/ReanimatedSwipeable.tsx b/src/components/ReanimatedSwipeable.tsx index a547837ae1..6cc207efff 100644 --- a/src/components/ReanimatedSwipeable.tsx +++ b/src/components/ReanimatedSwipeable.tsx @@ -580,6 +580,8 @@ const Swipeable = forwardRef( swipeableMethods, ]); + panGesture.enabled(props.enabled !== false); + const animatedStyle = useAnimatedStyle( () => ({ transform: [{ translateX: appliedTranslation.value }],