@@ -33,7 +33,8 @@ type Props = {
33
33
* Defines if bottom sheet could be scrollable by gesture. Defaults to true.
34
34
*/
35
35
enabledGestureInteraction ?: boolean
36
-
36
+ enabledHeaderGestureInteraction ?: boolean
37
+ enabledContentGestureInteraction ?: boolean
37
38
/**
38
39
* If false blocks snapping using snapTo method. Defaults to true.
39
40
*/
@@ -270,6 +271,8 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
270
271
initialSnap : 0 ,
271
272
enabledImperativeSnapping : true ,
272
273
enabledGestureInteraction : true ,
274
+ enabledHeaderGestureInteraction : true ,
275
+ enabledContentGestureInteraction : true ,
273
276
enabledInnerScrolling : true ,
274
277
springConfig : { } ,
275
278
innerGestureHandlerRefs : [
@@ -517,7 +520,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
517
520
cond ( lessThan ( limitedVal , min ) , set ( limitedVal , min ) ) ,
518
521
]
519
522
) ,
520
- set ( prevState , this . panState ) , //on iOS sometimes BEGAN event does not trigger
523
+ set ( prevState , this . panState ) , // on iOS sometimes BEGAN event does not trigger
521
524
set ( diffPres , sub ( prev , val ) ) ,
522
525
set ( prev , val ) ,
523
526
cond (
@@ -708,7 +711,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
708
711
} }
709
712
>
710
713
< PanGestureHandler
711
- enabled = { this . props . enabledGestureInteraction }
714
+ enabled = { this . props . enabledGestureInteraction && this . props . enabledHeaderGestureInteraction }
712
715
ref = { this . master }
713
716
waitFor = { this . panRef }
714
717
onGestureEvent = { this . handleMasterPan }
@@ -733,7 +736,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
733
736
}
734
737
>
735
738
< PanGestureHandler
736
- enabled = { this . props . enabledGestureInteraction }
739
+ enabled = { this . props . enabledGestureInteraction && this . props . enabledContentGestureInteraction }
737
740
waitFor = { this . master }
738
741
ref = { this . panRef }
739
742
onGestureEvent = { this . handlePan }
@@ -743,7 +746,7 @@ export default class BottomSheetBehavior extends React.Component<Props, State> {
743
746
< Animated . View >
744
747
< TapGestureHandler
745
748
ref = { this . tapRef }
746
- enabled = { this . props . enabledGestureInteraction }
749
+ enabled = { this . props . enabledGestureInteraction && this . props . enabledContentGestureInteraction }
747
750
onHandlerStateChange = { this . handleTap }
748
751
simultaneousHandlers = { this . props . simultaneousHandlers }
749
752
>
0 commit comments