MCPcopy Create free account
hub / github.com/adobe/react-spectrum / onDrop

Function onDrop

packages/react-aria/src/dnd/useDroppableCollection.ts:241–253  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

239 }
240 },
241 onDrop(e) {
242 setDropCollectionRef(ref);
243 if (state.target) {
244 onDrop(e, state.target);
245 }
246
247 // If there wasn't a collection being tracked as a dragged collection, then we are in a case where a non RSP drag is dropped on a
248 // RSP collection and thus we don't need to preserve the global DnD state for onDragEnd
249 let {draggingCollectionRef} = globalDndState;
250 if (draggingCollectionRef == null) {
251 clearGlobalDnDState();
252 }
253 }
254 });
255
256 let droppingState = useRef<DroppingState>(null);

Callers

nothing calls this directly

Calls 2

setDropCollectionRefFunction · 0.90
clearGlobalDnDStateFunction · 0.90

Tested by

no test coverage detected