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

Function onRootDrop

packages/dev/s2-docs/pages/s2/DroppableTableView.tsx:11–16  ·  view source on GitHub ↗
(e)

Source from the content-addressed store, hash-verified

9 let {dragAndDropHooks} = useDragAndDrop({
10 acceptedDragTypes: ['pokemon'],
11 async onRootDrop(e) {
12 let items = await Promise.all(
13 e.items.filter(isTextDropItem).map(async item => JSON.parse(await item.getText('pokemon')))
14 );
15 setItems(items);
16 }
17 });
18
19 return <PokemonTableView items={items} dragAndDropHooks={dragAndDropHooks} />;

Callers

nothing calls this directly

Calls 4

setItemsFunction · 0.85
filterMethod · 0.65
getTextMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected