"react-native": "0.55.4",
"react-native-draggable-flatlist": "^1.1.2",

this is what i done:
<DraggableFlatList
data={this.state.rowData}
renderItem={this.renderRowItem}
scrollPercent={5}
keyExtractor={(item, index) => `draggable-item-${index}`}
onMoveEnd={({ rowData }) => this.setState({ rowData })}
/>
renderRowItem = ({ item, index, move, moveEnd, isActive }) => {
return (
<TouchableOpacity
onLongPress={move}
onPressOut={moveEnd}
style={{
height: 100,
alignItems: 'center',
justifyContent: 'center'
}}
>
<Text>{item.name}</Text>
{/* <Row data={item} active={active} columnSchema={this.state.columnSchema} searchValue={this.state.searchValue} />; */}
</TouchableOpacity>
)
}
i m getting list successfully. but after drag it just disappear.
I am having the same problem. Did you get any solution?
@Sakthimalar no i simply give up on this lib.
@ZeroCool00 Can you able to show the list in Flatlist
We can show the flatlists for that we have to change the name of data.
For example, change From this
data={this.state.rowData}
To this
data={this.state.data}
@Sakthimalar can you able to drag and drop the data in the screen
I had a somewhat similar issue but my error was something about 'measure cannot find view with tag xxxx'. When i debugged it i noticed that after the moveEnd function was called my data object (this.state.myData) was undefined. However I also noticed that 'this.state' was undefined, it appears to be a strange context issue so this;
const self = this;
Then i used the self.state.myObject and the issue appears to be fixed. Hope this helps someone else.
On onMoveEnd method the name parameter must be 'data' like in the example:
onMoveEnd={({ data }) => this.setState({ data })}
Most helpful comment
On
onMoveEndmethod the name parameter must be'data'like in the example: