-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix error ref.measureLayout need to be called with native component
- Loading branch information
1 parent
fed8e47
commit 0ad061d
Showing
2 changed files
with
16 additions
and
0 deletions.
There are no files selected for viewing
File renamed without changes.
16 changes: 16 additions & 0 deletions
16
patches/react-native-draggable-flatlist+4.0.1+002+fix-console-error-ref-measureLayout.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/node_modules/react-native-draggable-flatlist/src/components/NestableDraggableFlatList.tsx b/node_modules/react-native-draggable-flatlist/src/components/NestableDraggableFlatList.tsx | ||
index 1559352..b84ee99 100644 | ||
--- a/node_modules/react-native-draggable-flatlist/src/components/NestableDraggableFlatList.tsx | ||
+++ b/node_modules/react-native-draggable-flatlist/src/components/NestableDraggableFlatList.tsx | ||
@@ -56,6 +56,11 @@ function NestableDraggableFlatListInner<T>( | ||
const onFail = () => { | ||
console.log("## nested draggable list measure fail"); | ||
}; | ||
+ | ||
+ if (typeof nodeHandle === "number" ) { | ||
+ return; | ||
+ } | ||
+ | ||
//@ts-ignore | ||
containerRef.current.measureLayout(nodeHandle, onSuccess, onFail); | ||
}); |