expose isDragging to DropTargetMonitor
See original GitHub issueI 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:
- Created 6 years ago
- Comments:12 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ultimately, I think
react-dnd
should exposeisDragging
to drop targets.Closing this, as my PR for the docs was merged.