Skip to content

Remove pointerEvents for the container #1

Description

@marqroldan

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch react-native-snap-area@0.1.1 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-snap-area/src/SnapArea.tsx b/node_modules/react-native-snap-area/src/SnapArea.tsx
index 8451f3c..7f4ced8 100644
--- a/node_modules/react-native-snap-area/src/SnapArea.tsx
+++ b/node_modules/react-native-snap-area/src/SnapArea.tsx
@@ -195,7 +195,7 @@ export function SnapArea(props: React.PropsWithChildren<Props>) {
   const child = React.Children.only(children);
 
   return (
-    <View style={{ width: '100%', height: '100%' }} onLayout={onLayoutParent}>
+    <View style={{ width: '100%', height: '100%' }} onLayout={onLayoutParent} pointerEvents={'box-none'}>
       <PanGestureHandler onGestureEvent={gestureHandler}>
         <Animated.View style={[{ position: 'absolute' }, stylez]}>
           <View onLayout={onLayoutChild}>{child}</View>

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions