()
| 78 | let onDragStart = vi.fn(); |
| 79 | let onDragEnd = vi.fn(); |
| 80 | function Example() { |
| 81 | let {dragAndDropHooks} = useDragAndDrop({ |
| 82 | pointerDragSource: 'handle', |
| 83 | getItems: keys => [...keys].map(key => ({'text/plain': String(key)})), |
| 84 | onDragStart, |
| 85 | onDragEnd |
| 86 | }); |
| 87 | return ( |
| 88 | <div style={{width: 400}}> |
| 89 | <TableView aria-label="Source" dragAndDropHooks={dragAndDropHooks}> |
| 90 | <TableHeader> |
| 91 | <Column isRowHeader>Name</Column> |
| 92 | </TableHeader> |
| 93 | <TableBody> |
| 94 | <Row id="cat" textValue="Cat"> |
| 95 | <Cell>Cat</Cell> |
| 96 | </Row> |
| 97 | </TableBody> |
| 98 | </TableView> |
| 99 | <DropZone onDrop={onDrop} onDropEnter={onDropEnter}> |
| 100 | Drop here |
| 101 | </DropZone> |
| 102 | </div> |
| 103 | ); |
| 104 | } |
| 105 | |
| 106 | await render(<Example />); |
| 107 | let button = page.getByRole('button', {name: /^Drag /}); |
nothing calls this directly
no test coverage detected