-
-
Notifications
You must be signed in to change notification settings - Fork 413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing ListHeaderComponent and/or ListFooterComponent throws errors on drag #483
Comments
…ent from PropsProvider
…ent from PropsProvider
Hitting the same issue. If I remove the ListHeaderComponent then the issue goes away. (But I need to use the header component...) Edit: Confirming that PR #484 fixes the issue for us. react-native-draggable-flatlist: 4.0.1 |
Also works react-native-draggable-flatlist: 4.0.1 Patchdiff --git a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx
index d7d98c2..183d431 100644
--- a/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx
+++ b/node_modules/react-native-draggable-flatlist/src/components/DraggableFlatList.tsx
@@ -402,14 +402,22 @@ function DraggableFlatListInner<T>(props: DraggableFlatListProps<T>) {
}
function DraggableFlatList<T>(
- props: DraggableFlatListProps<T>,
+ {
+ ListFooterComponent,
+ ListHeaderComponent,
+ ...props
+ }: DraggableFlatListProps<T>,
ref?: React.ForwardedRef<FlatList<T>> | null
) {
return (
<PropsProvider {...props}>
<AnimatedValueProvider>
<RefProvider flatListRef={ref}>
- <MemoizedInner {...props} />
+ <MemoizedInner
+ {...props}
+ ListFooterComponent={ListFooterComponent}
+ ListHeaderComponent={ListHeaderComponent}
+ />
</RefProvider>
</AnimatedValueProvider>
</PropsProvider> |
Describe the bug
Passing
ListHeaderComponent
and/orListFooterComponent
cause somewhere insidereact-native-draggable-flatlist
to raiseTypeError: Attempted to assign to readonly property (node._store)
, which seems to be related to this.To Reproduce
I don't have one at the moment. We aren't using expo, and I couldn't get Expo Snack to install the reanimated library.
Platform & Dependencies
The text was updated successfully, but these errors were encountered: