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

Function isValidDropTarget

packages/react-aria/src/dnd/DragManager.ts:128–136  ·  view source on GitHub ↗
(element: Element)

Source from the content-addressed store, hash-verified

126}
127
128export function isValidDropTarget(element: Element): boolean {
129 for (let target of dropTargets.keys()) {
130 if (nodeContains(target, element)) {
131 return true;
132 }
133 }
134
135 return false;
136}
137
138const CANCELED_EVENTS = [
139 'pointerdown',

Callers 4

resolveDropTargetMethod · 0.50
getPotentialTargetsMethod · 0.50

Calls 1

nodeContainsFunction · 0.90

Tested by

no test coverage detected