Postlagerkarte / blazor-dragdrop

Easy-to-use Drag and Drop Library for Blazor
MIT License
399 stars 96 forks source link

Is it possible to use it with an empty dropzone? #132

Open Traijan1 opened 2 years ago

Traijan1 commented 2 years ago

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?

SJongbloets commented 2 years ago

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

PeterPaulG commented 2 years ago

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: `

@context.Auftragsbezeichnung
                    </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.