(e)
| 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} />; |