react-dnd-html5-backend icon indicating copy to clipboard operation
react-dnd-html5-backend copied to clipboard

connectDragSource can specify custom dataTransfer data

Open bspaulding opened this issue 8 years ago • 0 comments

I've got a use case with a codebase in transition, where ideally I'd like to interop with the existing code. Are you opposed to something like this? Shouldn't change any behavior that I can see.

This let's a react-dnd user do:

connectDragSource(
  <div>MyDraggable</div>,
  { 
    dataTransferData: {
      some: 'extra-stuff-another-lib-will-use'
    }
  }
)

bspaulding avatar Jan 19 '17 03:01 bspaulding