Skip to content

Dropzone, added DragEnd property to allow executing logic when a drag operation ends #97

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

Merged

Conversation

ViRuSTriNiTy
Copy link
Collaborator

see #96

@Postlagerkarte
Copy link
Owner

Looks great! Thanks.

@Postlagerkarte Postlagerkarte merged commit c15f7a3 into Postlagerkarte:master Feb 13, 2021
@ViRuSTriNiTy
Copy link
Collaborator Author

@Postlagerkarte Would you please release a new NuGet package? Otherwise I need to work with a git submodule and this is somewhat tedious.

@k2tomasz
Copy link
Contributor

@ViRuSTriNiTy DragDropService is reset (DragDropService.ActiveItem = default) before DragEnd is called resulting in null being passed as parameter to DragEnd.

@ViRuSTriNiTy
Copy link
Collaborator Author

@tkrakowiak Can you provide a minimal reproducible example?

@k2tomasz
Copy link
Contributor

k2tomasz commented Jun 21, 2021

@ViRuSTriNiTy you can change your ToDoList example like this:

<Dropzone Items="MyToDoList" DragEnd="DragEnd">
    <Todo OnRemoveClick="(item)=>MyToDoList.Remove(item)" Item="@context"></Todo>
</Dropzone>

private void DragEnd(TodoItem obj)
{
    var todo = obj;
}

@k2tomasz
Copy link
Contributor

@ViRuSTriNiTy I think this PR would be enough to fix it.

#119

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

Successfully merging this pull request may close these issues.

3 participants