MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / endDrag

Function endDrag

examples/01 Dustbin/Single Target/Box.js:23–32  ·  view source on GitHub ↗
(props, monitor)

Source from the content-addressed store, hash-verified

21 },
22
23 endDrag(props, monitor) {
24 const item = monitor.getItem();
25 const dropResult = monitor.getDropResult();
26
27 if (dropResult) {
28 window.alert( // eslint-disable-line no-alert
29 `You dropped ${item.name} into ${dropResult.name}!`,
30 );
31 }
32 },
33};
34
35@DragSource(ItemTypes.BOX, boxSource, (connect, monitor) => ({

Callers

nothing calls this directly

Calls 2

getItemMethod · 0.45
getDropResultMethod · 0.45

Tested by

no test coverage detected