react-native-sortable-grid icon indicating copy to clipboard operation
react-native-sortable-grid copied to clipboard

onDragStart not working with delete functionality?

Open saulable opened this issue 7 years ago • 0 comments

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}
>

saulable avatar Nov 03 '18 20:11 saulable