Open qplace1 opened 2 years ago
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. I wasn't able to replicate the Accepts method not being called. The method you provided in the example returns always true. Can you try placing a breakpoint in it to see if it gets hit?
Lastly, the activeItem shouldn't be null at that point as it was set in the OnDragStart method :)
@vkristijan : Thank you! I think that the issue with Accept is a derivative of me skipping DropZone from the source item. Making change, will report back.
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!