@@ -378,6 +378,14 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
378
378
keyboardBehavior ,
379
379
] ) ;
380
380
const animatedScrollableState = useDerivedValue ( ( ) => {
381
+ /**
382
+ * if user had disabled content panning gesture, then we unlock
383
+ * the scrollable state.
384
+ */
385
+ if ( ! enableContentPanningGesture ) {
386
+ return SCROLLABLE_STATE . UNLOCKED ;
387
+ }
388
+
381
389
/**
382
390
* if scrollable override state is set, then we just return its value.
383
391
*/
@@ -414,6 +422,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
414
422
415
423
return SCROLLABLE_STATE . LOCKED ;
416
424
} , [
425
+ enableContentPanningGesture ,
417
426
animatedAnimationState . value ,
418
427
animatedKeyboardState . value ,
419
428
animatedScrollableOverrideState . value ,
@@ -1821,6 +1830,10 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1821
1830
} ,
1822
1831
} ) ;
1823
1832
}
1833
+
1834
+ const DraggableView = enableContentPanningGesture
1835
+ ? BottomSheetDraggableView
1836
+ : Animated . View ;
1824
1837
return (
1825
1838
< BottomSheetProvider value = { externalContextVariables } >
1826
1839
< BottomSheetInternalProvider value = { internalContextVariables } >
@@ -1858,7 +1871,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1858
1871
accessibilityRole = { _providedAccessibilityRole ?? undefined }
1859
1872
accessibilityLabel = { _providedAccessibilityLabel ?? undefined }
1860
1873
>
1861
- < BottomSheetDraggableView
1874
+ < DraggableView
1862
1875
key = "BottomSheetRootDraggableView"
1863
1876
style = { contentContainerStyle }
1864
1877
>
@@ -1869,7 +1882,7 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
1869
1882
footerComponent = { footerComponent }
1870
1883
/>
1871
1884
) }
1872
- </ BottomSheetDraggableView >
1885
+ </ DraggableView >
1873
1886
</ Animated . View >
1874
1887
< BottomSheetHandleContainer
1875
1888
key = "BottomSheetHandleContainer"
0 commit comments