Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onDragStart not working with delete functionality? #54

Open
saulable opened this issue Nov 3, 2018 · 0 comments
Open

onDragStart not working with delete functionality? #54

saulable opened this issue Nov 3, 2018 · 0 comments

Comments

@saulable
Copy link

saulable commented Nov 3, 2018

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}
>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant