peterh32 / react-drag-drop-container

ReactJS drag and drop functionality for mouse and touch devices
MIT License
154 stars 47 forks source link

Drop does not work in the basic example #33

Open icehongssii opened 6 years ago

icehongssii commented 6 years ago

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';

Drag Me!

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

`

eduardohralejandro commented 5 years ago

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

kadariuk commented 5 years ago

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.

born-kes commented 4 years ago

use

.ddcontainerghost{
    pointer-events:none;
}