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

Function registerDropTarget

packages/react-aria/src/dnd/DragManager.ts:52–59  ·  view source on GitHub ↗
(target: DropTarget)

Source from the content-addressed store, hash-verified

50}
51
52export function registerDropTarget(target: DropTarget) {
53 dropTargets.set(target.element, target);
54 dragSession?.updateValidDropTargets();
55 return (): void => {
56 dropTargets.delete(target.element);
57 dragSession?.updateValidDropTargets();
58 };
59}
60
61interface DroppableItem {
62 element: FocusableElement;

Callers

nothing calls this directly

Calls 3

deleteMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected