-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Hi! ๐
Firstly, thanks for your work on this project! ๐
Today I used patch-package to patch @mgcrea/[email protected] for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@mgcrea/react-native-dnd/dist/DndProvider.js b/node_modules/@mgcrea/react-native-dnd/dist/DndProvider.js
index 2bbf21f..f605c45 100644
--- a/node_modules/@mgcrea/react-native-dnd/dist/DndProvider.js
+++ b/node_modules/@mgcrea/react-native-dnd/dist/DndProvider.js
@@ -298,11 +298,12 @@ export const DndProvider = forwardRef(function DndProvider({ children, springCon
return panGesture;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [disabled]);
+ const Component = disabled? View : GestureDetector;
return (<DndContext.Provider value={contextValue.current}>
- <GestureDetector gesture={panGesture}>
+ <Component gesture={panGesture}>
<View ref={containerRef} collapsable={false} style={style} testID="view">
{children}
</View>
- </GestureDetector>
+ </Component>
</DndContext.Provider>);
});This issue body was partially generated by patch-package.
Metadata
Metadata
Assignees
Labels
No labels