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

Function onDrop

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

Source from the content-addressed store, hash-verified

241 }
242 },
243 onDrop(e) {
244 setDropCollectionRef(ref);
245 if (state.target) {
246 onDrop(e, state.target);
247 }
248
249 // 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
250 // RSP collection and thus we don't need to preserve the global DnD state for onDragEnd
251 let {draggingCollectionRef} = globalDndState;
252 if (draggingCollectionRef == null) {
253 clearGlobalDnDState();
254 }
255 }
256 });
257
258 let droppingState = useRef<DroppingState>(null);

Callers

nothing calls this directly

Calls 2

setDropCollectionRefFunction · 0.90
clearGlobalDnDStateFunction · 0.90

Tested by

no test coverage detected