Skip to content

Commit

Permalink
fix error ref.measureLayout need to be called with native component
Browse files Browse the repository at this point in the history
  • Loading branch information
kubabutkiewicz committed Feb 6, 2025
1 parent fed8e47 commit 0ad061d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
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);
});

0 comments on commit 0ad061d

Please sign in to comment.