You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
qplace1
changed the title
Startup.cs vs Program.cs in
Startup.cs vs Program.cs
Apr 17, 2022
qplace1
changed the title
Startup.cs vs Program.cs
Startup.cs vs Program.cs and ActiveItem equall null
Apr 17, 2022
qplace1
changed the title
Startup.cs vs Program.cs and ActiveItem equall null
Startup.cs vs Program.cs and ActiveItem equals null
Apr 18, 2022
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!
The text was updated successfully, but these errors were encountered: