blazor-dragdrop
blazor-dragdrop copied to clipboard
Is it possible to use it with an empty dropzone?
Hello,
I began with a simple todo list in blazor and I wanted to use Drag'n'Drop. I found this repo and implemented it, but with an empty dropzone (empty list) I can't drop an item from another todo list in it.
Is there a way to implement this?
by default the class ".plk-dd-dropzone" doesn't have a height so the dropzone just isn't visible, I've set it's height to 100% myself to match the container size it's in and then it works perfect with empty lists
Hi,
I changed the settings of height to a minimum of 50px and visualized it in my project with a border. The draggable Items can be add in the empty list (according to "lastdropped" in console), but they can't be visualized in the new dropzone. They just stay in the original dropzone and the empty dropzone stays empty.
This is my dropzone with content:
<Dropzone Items="Auftrags" TItem="AuftragsKlasse" OnItemDrop="@((i)=>lastdropped = i)"> <div style="border: 2px solid black"> @context.Auftragsbezeichnung </div> </Dropzone>
This is one my empty dropzones:
<Dropzone Items="Auftrags" TItem="AuftragsKlasse" OnItemDrop="@((i)=>lastdropped = i)"> </Dropzone>
Class: Auftragsklasse Item of Auftragsklasse: Auftrags Property of Auftrags: Auftragsbezeichnung
Any solutions?
Thanks.