react-drag-drop-container icon indicating copy to clipboard operation
react-drag-drop-container copied to clipboard

Drop does not work in the basic example

Open icehongssii opened this issue 6 years ago • 3 comments

Above all I want to say thank you to build the easiest library to use! But, I am wondering If the example is actually working. I can drag but It does not fix on the drop target.

This is the code that i use

**problem : ** drop is not working. It is able to drag but when I drop on the p tag. it comes back right away. purpose : I want to put "drag" div on the droptarget sentence. so that it can be fixed not moving.


`import { DragDropContainer, DropTarget } from 'react-drag-drop-container'; <DragDropContainer targetKey="foo" >

Drag Me!

I'm a valid drop target for the object above since we both have the same targetKey!

`

icehongssii avatar Sep 20 '18 08:09 icehongssii

I am having the same question, please let me know if you already got a solution, thank you

eduardohralejandro avatar Nov 23 '18 14:11 eduardohralejandro

If you refer to "Demo: Drag in the directions indicated" the drop doesn't work cause you must implement onDrop or onHit handler for fix element on DropTarget.

kadariuk avatar Nov 27 '18 13:11 kadariuk

use

.ddcontainerghost{
    pointer-events:none;
}

born-kes avatar Jul 26 '20 21:07 born-kes