react-draggable icon indicating copy to clipboard operation
react-draggable copied to clipboard

Seems that specifying position does not affect the Draggable during drag

Open hiredgunhouse opened this issue 6 years ago • 3 comments
trafficstars

According to the docs Draggable should ignore internal state when posiontion prop is specified, but this does not seem to be the case, see an example here https://codesandbox.io/s/9l9kmlmymr

hiredgunhouse avatar Apr 19 '19 16:04 hiredgunhouse

Ok, I think I've found the problem, I also had a prop axis="x" which seemed to interfere with position. Unfortunately it's not mentioned in the docs, it would be nice if this was in the docs.

hiredgunhouse avatar Apr 19 '19 16:04 hiredgunhouse

This saved me, indeed for any sort of control over the dragged position you need to set axis="none".

mraak avatar May 10 '19 09:05 mraak

Set axis to none and disabled as true to stop . If you want to move provide position based on Ur need

sankarnarayanansr avatar Apr 20 '21 11:04 sankarnarayanansr