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

Function App

packages/react-aria-components/test/ListBox.test.js:2449–2461  ·  view source on GitHub ↗
({first})

Source from the content-addressed store, hash-verified

2447
2448 it('should only treat visible items as duplicate keys across Activity boundaries', () => {
2449 function App({first}) {
2450 return (
2451 <ListBox aria-label="Test">
2452 <React.Activity mode={first ? 'visible' : 'hidden'}>
2453 <ListBoxItem id="a">First A</ListBoxItem>
2454 </React.Activity>
2455 <React.Activity mode={first ? 'hidden' : 'visible'}>
2456 <ListBoxItem id="a">Second A</ListBoxItem>
2457 </React.Activity>
2458 <ListBoxItem id="b">B</ListBoxItem>
2459 </ListBox>
2460 );
2461 }
2462
2463 let {getAllByRole, rerender, unmount} = render(<App first />);
2464 expect(getAllByRole('option').map(o => o.textContent)).toEqual(['First A', 'B']);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected