react-native-sortable-grid
react-native-sortable-grid copied to clipboard
onDragStart not working with delete functionality?
Hello,
When I update the state inside of my own component, along with onDeleteItem. For instance this works.
onDragStart = () => {
this.setState({toScrollEnabled: false});
}
<SortableGrid
ref={'SortableGrid'}
itemsPerRow={4}
// onDeleteItem={this.onDeleteItem}
onDeleteItem={item => console.log('Item was deleted:', item)}
//onDragStart={this.onDragStart}
onDragRelease={this.onDragRelease}
>
But this doesn't. It adds an extra component to the end of the array?
<SortableGrid
ref={'SortableGrid'}
itemsPerRow={4}
// onDeleteItem={this.onDeleteItem}
onDeleteItem={item => console.log('Item was deleted:', item)}
onDragStart={this.onDragStart}
onDragRelease={this.onDragRelease}
>