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

Function getItems

packages/dev/s2-docs/pages/s2/DraggableTreeView.tsx:7–13  ·  view source on GitHub ↗
(keys, items)

Source from the content-addressed store, hash-verified

5export function DraggableTreeView() {
6 let {dragAndDropHooks} = useDragAndDrop<Pokemon>({
7 getItems(keys, items) {
8 return items.map(item => ({
9 'text/plain': `${item.name} – ${item.type}`,
10 'text/html': `<strong>${item.name}</strong> – <em>${item.type}</em>`,
11 pokemon: JSON.stringify(item)
12 }));
13 }
14 });
15
16 return <PokemonTreeView dragAndDropHooks={dragAndDropHooks} />;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected