computerjazz / react-native-draggable-flatlist

A drag-and-drop-enabled FlatList for React Native
MIT License
1.94k stars 406 forks source link

Type {children} has no properties in common with type 'IntrinsicAttributes & ScrollViewProps' #374

Open dlehddnjs opened 2 years ago

dlehddnjs commented 2 years ago

Describe the bug When using NestableScrolContainer with NestableDraggableFlatList, Error occurs in NestableScrollContainer, but it's still working on iOS Simulator & Android Device.

Error : Type {children: Element[]} has no properties in common with type 'IntrinsicAttributes & ScrollViewProps'

Code Example:

<NestableScrollContainer>
    <View />
    // FlatList 1
    <View />
    <NestableDraggableFlatList>
    </NestableDraggableFlatList>
    // FlatList 2
    <View />
    <NestableDraggableFlatList>
    </NestableDraggableFlatList>
</NestableScrollContainer>

Platform & Dependencies Please list any applicable dependencies in addition to those below (react-navigation etc).

computerjazz commented 2 years ago

can you create a snack that displays the issue? I cannot reproduce, and am confused about whether or not your example is complete--i.e. rendering a DraggableFlatList using opening/closing jsx with no props would throw an error for other reasons:

    <NestableDraggableFlatList>
    </NestableDraggableFlatList>
dlehddnjs commented 2 years ago

Sorry for confuse you, actual source code is written like this.

<NestableScrollContainer>
    <View />
    // FlatList 1
    <View />
    <NestableDraggableFlatList 
        ...props 
     />
    </NestableDraggableFlatList>
    // FlatList 2
    <View />
    <NestableDraggableFlatList 
        ...props 
     />
</NestableScrollContainer>

I'm at work right now, so it can be delayed, but i will create a snack ASAP.