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

[DragDropContext] Options: shouldDrop #3

Open
Vorlias opened this issue Nov 2, 2019 · 1 comment
Open

[DragDropContext] Options: shouldDrop #3

Vorlias opened this issue Nov 2, 2019 · 1 comment
Labels
enhancement New feature or request proposed

Comments

@Vorlias
Copy link
Member

Vorlias commented Nov 2, 2019

Kind of similar to Roact.Component.shouldUpdate - Will allow you to control whether or not messages are passed from the source to the target.

This gives global control of drop behaviour, rather than individual control like DropTarget.CanDrop.

interface DragDropContextOptions {
    // This function allows controlling whether or not dropping works between target and source
    shouldDrop?: (target: DragTarget, source: DragSource) => boolean;
}
@Vorlias Vorlias added enhancement New feature or request proposed labels Nov 2, 2019
@Vorlias
Copy link
Member Author

Vorlias commented Nov 3, 2019

Also willDrop and didDrop maybe?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposed
Projects
None yet
Development

No branches or pull requests

1 participant