react-grid-layout / react-draggable

React draggable component
MIT License
9.01k stars 1.02k forks source link

Programmatically drag another Draggable #205

Open 0b01 opened 7 years ago

0b01 commented 7 years ago

This is my use case. I have a bar of components that the user can drag and drop to a grid(using react-grid-layout, which in turn uses react-draggable). So I'm essentially calling ondragstart on a Draggable item.

This is what is it does as of now:

  1. user drags item from topbar
  2. creates new GridItem
  3. item calls onDragStart (how?) and listens to mouse event (how?)

Anyone knows how to do this?

mraak commented 6 years ago

This is one of the demos in the examples: http://mzabriskie.github.io/react-draggable/example/