question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

expose isDragging to DropTargetMonitor

See original GitHub issue

I want to make a drop target that appears on top of other content once the user starts dragging something.

But DropTargetMonitor doesn’t provide an isDragging method, so it’s basically impossible for me to do this without some kind of ugly hack. Why was isDragging excluded from DropTargetMonitor?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (9 by maintainers)

github_iconTop GitHub Comments

5reactions
jedwards1211commented, Jul 10, 2017

Ultimately, I think react-dnd should expose isDragging to drop targets.

0reactions
jedwards1211commented, Jul 11, 2017

Closing this, as my PR for the docs was merged.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tutorial - React DnD
For now, I'm going to keep it simple and expose a moveKnight function that ... isDragging(), }), })) return ( <div ref={drag} style={{...
Read more >
Rethinking In React DnD
isDragging (props, monitor): Optional. By default, only the drag source that initiated the drag operation is considered to be dragging. The above ...
Read more >
gaearon/react-dnd - Gitter
Best way to detect isDragging in a non-DnD parent/wrapper component? ... The actual javascript events are not exposed in drop targets or draggable...
Read more >
React DnD
... 'drag is in process'), and exposes them to you so that you can change props. ... DragSourceMonitor#isDragging(): returns true if a drag...
Read more >
useDrag method of react-dnd , cannot get isDragging in ...
Got the answer from react-dnd TSX example. sandbox url const [{ isDragging }, drag] = useDrag({ type: "image", item: () => { return...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found