react-native-draggable-flatlist icon indicating copy to clipboard operation
react-native-draggable-flatlist copied to clipboard

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

Open IsmetGlumcevic opened this issue 3 years ago • 2 comments

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 ( <ScaleDecorator key={item.id}> <TouchableOpacity activeOpacity={1} onLongPress={drag} disabled={isActive} style={[ styles.item, { backgroundColor: isActive ? "red" : "#fff" }, ]} > <View style={styles.card}> <View style={styles.cardHeader}> <Text style={styles.title}>{item.name}</Text> </View> <NestableScrollContainer> <NestableDraggableFlatList data={data2} extraData={data2} onDragEnd={({ data, from, to }) => setData2(data)} keyExtractor={item => item.id} renderItem={renderItem2} /> </NestableScrollContainer> </View> </TouchableOpacity> </ScaleDecorator> ) };

     <DraggableFlatList
            data={data.filter(item => item.closed === false)}
            extraData={data}
            horizontal
            onDragEnd={({ data, from, to }) => setDtata(data)}
            keyExtractor={item => item.id}
            renderItem={renderItem}
        />`

IsmetGlumcevic avatar Jul 21 '22 05:07 IsmetGlumcevic

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 avatar Sep 26 '22 18:09 thomas-colbert

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.

trungledangAxonActive avatar Sep 27 '23 04:09 trungledangAxonActive