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

Function TabNavTable

packages/@react-spectrum/s2/test/TableView.test.tsx:300–360  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

298
299 describe('tab keyboard navigation', () => {
300 function TabNavTable(props) {
301 let {dragAndDropHooks} = useDragAndDrop({
302 getItems: keys => [...keys].map(key => ({'text/plain': `${key}`}))
303 });
304 return (
305 <TableView
306 aria-label="Tab mode table"
307 keyboardNavigationBehavior="tab"
308 selectionMode="multiple"
309 dragAndDropHooks={dragAndDropHooks}
310 {...props}>
311 <TableHeader>
312 <Column
313 isRowHeader
314 menuItems={
315 <MenuSection>
316 <MenuItem>
317 <Text slot="label">Filter</Text>
318 </MenuItem>
319 </MenuSection>
320 }>
321 Name
322 </Column>
323 <Column
324 menuItems={
325 <MenuSection>
326 <MenuItem>
327 <Text slot="label">Filter</Text>
328 </MenuItem>
329 </MenuSection>
330 }>
331 Type
332 </Column>
333 <Column>Notes</Column>
334 </TableHeader>
335 <TableBody>
336 <Row id="1" textValue="Foo 1">
337 <Cell>Foo 1</Cell>
338 <Cell>Bar 1</Cell>
339 <Cell>
340 <input type="text" aria-label="Foo 1 notes" />
341 </Cell>
342 </Row>
343 <Row id="2" textValue="Foo 2">
344 <Cell>Foo 2</Cell>
345 <Cell>Bar 2</Cell>
346 <Cell>
347 <input type="text" aria-label="Foo 2 notes" />
348 </Cell>
349 </Row>
350 <Row id="3" textValue="Foo 3">
351 <Cell>Foo 3</Cell>
352 <Cell>Bar 3</Cell>
353 <Cell>
354 <input type="text" aria-label="Foo 3 notes" />
355 </Cell>
356 </Row>
357 </TableBody>

Callers

nothing calls this directly

Calls 1

useDragAndDropFunction · 0.90

Tested by

no test coverage detected