File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
src/components/bottomSheetDraggableView Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ const BottomSheetDraggableViewComponent = ({
2424 activeOffsetY,
2525 failOffsetX,
2626 failOffsetY,
27+ animatedScrollableState,
2728 } = useBottomSheetInternal ( ) ;
2829 const { contentPanGestureHandler } = useBottomSheetGestureHandlers ( ) ;
2930 //#endregion
@@ -59,6 +60,14 @@ const BottomSheetDraggableViewComponent = ({
5960 . enabled ( enableContentPanningGesture )
6061 . shouldCancelWhenOutside ( false )
6162 . runOnJS ( false )
63+ . manualActivation ( true )
64+ . onTouchesMove ( ( _ , stateManager ) => {
65+ if ( animatedScrollableState . value . contentOffsetY !== 0 ) {
66+ stateManager . fail ( ) ;
67+ return ;
68+ }
69+ stateManager . activate ( ) ;
70+ } )
6271 . onStart ( contentPanGestureHandler . handleOnStart )
6372 . onChange ( contentPanGestureHandler . handleOnChange )
6473 . onEnd ( contentPanGestureHandler . handleOnEnd )
@@ -99,6 +108,7 @@ const BottomSheetDraggableViewComponent = ({
99108 failOffsetY ,
100109 simultaneousHandlers ,
101110 waitFor ,
111+ animatedScrollableState ,
102112 contentPanGestureHandler . handleOnChange ,
103113 contentPanGestureHandler . handleOnEnd ,
104114 contentPanGestureHandler . handleOnFinalize ,
You can’t perform that action at this time.
0 commit comments