computerjazz / react-native-draggable-flatlist

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

Not able to drag item in nestable dragable flatlist inside dragable flatslis #398

Open IsmetGlumcevic opened 2 years ago

IsmetGlumcevic commented 2 years ago

I have dragableflatlist and inside nestabledragableflatlist.

"react": "18.0.0", "react-native": "0.69.1", "react-native-draggable-flatlist": "^3.1.2", "react-native-gesture-handler": "^2.5.0", "react-native-linear-gradient": "^2.6.2", "react-native-reanimated": "^2.9.1",

` const renderItem = ({ item, drag, isActive }) => { return (

{item.name} setData2(data)} keyExtractor={item => item.id} renderItem={renderItem2} />
       )
     };

     <DraggableFlatList
            data={data.filter(item => item.closed === false)}
            extraData={data}
            horizontal
            onDragEnd={({ data, from, to }) => setDtata(data)}
            keyExtractor={item => item.id}
            renderItem={renderItem}
        />`
thomas-colbert commented 2 years ago

If the TouchableOpacity is disabled when isActive = false, and isActive = false until you're dragging, doesn't that mean you'll never be able to drag an item? I'd guess that if you remove the disabled prop, you'd be able to drag the items.

trungledangAxonActive commented 1 year ago

If the TouchableOpacity is disabled when isActive = false, and isActive = false until you're dragging, doesn't that mean you'll never be able to drag an item? I'd guess that if you remove the disabled prop, you'd be able to drag the items.

@thomas-colbert I'm facing the same issue and tried your suggestion. Unfortunately, that doesn't work.