draggable icon indicating copy to clipboard operation
draggable copied to clipboard

Ability to specify with logic what is draggable and where it can be dropped

Open mdhtr opened this issue 7 years ago • 1 comments

I would like to migrate to Draggable from Dragula. I'm using Sortable with multiple columns for this and I already figured out how to substitute the still non-existent revertOnSpill functionality with event hooks, and my next challenge is to somehow be able to apply logic when the user clicks an element, that would prevent the user from dragging if the logic says no, even if the css class would allow it. I also need to prevent dropping to specific containers.

Use cases: Prevent dragging: I would like to query the application state or the server before letting the user drag an item, to handle concurrency. Prevent dropping: I would like to specify for some items that they are only droppable in certain containers, or to specify a certain order between containers (drop from A to B and B to C but not from A to C)

Is there a way to do this?

This is the fiddle I collect my knowledge in on the migration.

mdhtr avatar Oct 05 '18 14:10 mdhtr

Did you find a way to achieve this?

dotgodly avatar Mar 25 '19 23:03 dotgodly