react-draggable
react-draggable copied to clipboard
How to move Draggable to a div and it can only be dropped within that?
Can i move a draggable to a div block and it can only be dropped within that? If i release the mouse outside the div, draggable will return to it original position.
Can someone have a solution?
same problem +1.
bounds="parent-div"
bounds="parent-div"
@june6969 bounds="parent-div" can be useful when my draggable element inside the div block from the begining. But I mean outside to inside
same problem +1.
@KashanSiddiqui seems draggable can be bounds to its offsetParent, but it defines nothing about drop zone. So I have switched to react-dnd.
Same problem
bounds="parent-div"
@june6969
bounds="parent-div"can be useful when my draggable element inside the div block from the begining. But I mean outside to inside
It gives me an error in the console: Bounds selector "parent-div" could not find an element.
I had same problem, there is no feature in the library for drop targets. React dnd and Interact.js will work in this case.