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

Function getDroppableCollectionRef

packages/react-aria/src/dnd/utils.ts:46–55  ·  view source on GitHub ↗
(
  state: DroppableCollectionState
)

Source from the content-addressed store, hash-verified

44}
45
46export function getDroppableCollectionRef(
47 state: DroppableCollectionState
48): RefObject<HTMLElement | null> {
49 let {ref} = droppableCollectionMap.get(state) || {};
50 if (!ref) {
51 throw new Error('Droppable item outside a droppable collection');
52 }
53
54 return ref;
55}
56
57export function getTypes(items: DragItem[]): Set<string> {
58 let types = new Set<string>();

Callers 1

useDroppableItemFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected