Open rammi44 opened 6 years ago
<SortableList style={styles.list} contentContainerStyle={styles.contentContainer} data={this.state.todoItemArray} renderRow={this._renderRow} />
updating state here:
// this.state.todoItemArray.push({ 'Item': item, 'TodoItemstyle': todoItembgStyle });
this.state.todoItemArray = this.state.todoItemArray.concat({ 'Item': item, 'TodoItemstyle': todoItembgStyle });
Instead of push i am using concat its working....
I'm hitting the same issue. If I want to override the state data, the list is not updating.
The list doesn't change if I do this (example):
this.setState({
data: newData
})
What's the recommended way to work around it?
Have the same issue any update on this issue ?
I have the same issue, did you find the solution for that?
Same issue
@Nahani
Same issue If you are not using expo try this library https://github.com/computerjazz/react-native-draggable-flatlist I had a lot of problems with that functionality in my previous app so I decided to remove it. But hopefully this will help.
<SortableList style={styles.list} contentContainerStyle={styles.contentContainer} data={this.state.todoItemArray} renderRow={this._renderRow} />
I have given like this. if the "this.state.todoItemArray" is updating but in render row that is not updating, showing previous values only, not happening as we expected..