blazor-dragdrop icon indicating copy to clipboard operation
blazor-dragdrop copied to clipboard

Is it possible to use it with an empty dropzone?

Open Traijan1 opened this issue 3 years ago • 2 comments

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?

Traijan1 avatar Nov 27 '21 14:11 Traijan1

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

SJongbloets avatar Jan 05 '22 14:01 SJongbloets

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.

PeterPaulG avatar Mar 21 '22 07:03 PeterPaulG