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

Function TabNavTable

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

useDragAndDropFunction · 0.90

Tested by

no test coverage detected