Postlagerkarte / blazor-dragdrop

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

How to drop an Item onto a dropzone of a different type from the source and map values? #125

Closed IbrahimTimimi closed 3 years ago

IbrahimTimimi commented 3 years ago

I have two dropzones that are of different types. DropzoneA accepts classA items and DropzoneB accepts classB items. How to drop a classA item onto DropzoneB and map values to classB?

ViRuSTriNiTy commented 3 years ago

I'm afraid that this is not possible because the service holding the drag & drop state is tied to a specific item class. Hence you need to create an use a class that represents both item types.

IbrahimTimimi commented 3 years ago

Thanks for your reply. Ok noted, I thought it had this feature, It will be cool to have it.

To solve my issue, I will use serialized list string for both zones and then deserialize to specific classes when rendering.