-
Notifications
You must be signed in to change notification settings - Fork 94
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
Startup.cs vs Program.cs and ActiveItem equals null #142
Comments
It should be ok to use builder.Services.AddBlazorDragDrop(); in Program.cs As for your other 2 questions, CopyItem works only across different DropZones, if you are dragging an item within the same DropZone, it will not be called. Lastly, the activeItem shouldn't be null at that point as it was set in the OnDragStart method :) |
@vkristijan : Thank you! |
Documentation states:
Add BlazorDragDrop to your Startup.cs
services.AddBlazorDragDrop();
.net 6 requires usage of Program.cs.
So, I am using builder.Services.AddBlazorDragDrop(); in Program.cs
The problem I am having is that in my project, derived from the Demo project, the methods copiedItem or acceptItem are never called:
I added the DragDrop project to my solution to try to figure out what is going on. In dropzone.cs, line 311, in the method:
private bool IsDropAllowed()
{
var activeItem = DragDropService.ActiveItem;
...
the variable activeItem is always null.
What am I doing wrong? Any advise, or help for which I'll gladly pay will be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: