diff --git a/src/index.tsx b/src/index.tsx index 5a6b3ca..9a82e11 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -268,7 +268,7 @@ export default forwardRef( ...config, velocity: typeof velocity !== 'number' ? undefined : velocity, }).start(); - }else { + } else { Animated.spring(animations.translateY, { toValue: initialValue.current, useNativeDriver: true, @@ -276,7 +276,7 @@ export default forwardRef( velocity: typeof velocity !== 'number' ? undefined : velocity, }).start(); } - + notifySnapIndexChanged(); }, // eslint-disable-next-line react-hooks/exhaustive-deps @@ -349,7 +349,9 @@ export default forwardRef( if (drawUnderStatusBar || props.onChange) { animationListener = animations.translateY.addListener(value => { const correctedValue = - value.value > minTranslateValue.current ? value.value - minTranslateValue.current : 0; + value.value > minTranslateValue.current + ? value.value - minTranslateValue.current + : 0; props?.onChange?.(correctedValue, actionSheetHeight.current); if (drawUnderStatusBar) { if (lock.current) return; @@ -1472,7 +1474,10 @@ export default forwardRef( + style={styles.parentContainer} + pointerEvents={ + props?.backgroundInteractionEnabled ? 'box-none' : 'auto' + }> ( const GestureHandlerRoot = (props: any) => { return props.isModal ? ( - + {props.children} ) : (