Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,15 +268,15 @@ export default forwardRef<ActionSheetRef, ActionSheetProps>(
...config,
velocity: typeof velocity !== 'number' ? undefined : velocity,
}).start();
}else {
} else {
Animated.spring(animations.translateY, {
toValue: initialValue.current,
useNativeDriver: true,
...config,
velocity: typeof velocity !== 'number' ? undefined : velocity,
}).start();
}

notifySnapIndexChanged();
},
// eslint-disable-next-line react-hooks/exhaustive-deps
Expand Down Expand Up @@ -349,7 +349,9 @@ export default forwardRef<ActionSheetRef, ActionSheetProps>(
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;
Expand Down Expand Up @@ -1472,7 +1474,10 @@ export default forwardRef<ActionSheetRef, ActionSheetProps>(
<Root {...rootProps}>
<GestureHandlerRoot
isModal={isModal}
style={styles.parentContainer}>
style={styles.parentContainer}
pointerEvents={
props?.backgroundInteractionEnabled ? 'box-none' : 'auto'
}>
<PanGestureRefContext.Provider value={context}>
<DraggableNodesContext.Provider value={draggableNodesContext}>
<Animated.View
Expand Down Expand Up @@ -1654,7 +1659,9 @@ export default forwardRef<ActionSheetRef, ActionSheetProps>(

const GestureHandlerRoot = (props: any) => {
return props.isModal ? (
<GestureHandlerRootView style={props.style}>
<GestureHandlerRootView
style={props.style}
pointerEvents={props.pointerEvents}>
{props.children}
</GestureHandlerRootView>
) : (
Expand Down