()
| 1122 | } |
| 1123 | |
| 1124 | function AsyncComboBox() { |
| 1125 | let list = useAsyncList({ |
| 1126 | getKey: item => item.id, |
| 1127 | async load({filterText}) { |
| 1128 | let rows = itemsForFilterText(filterText); |
| 1129 | await new Promise(resolve => setTimeout(resolve, ASYNC_DELAY_MS)); |
| 1130 | return {items: rows}; |
| 1131 | } |
| 1132 | }); |
| 1133 | |
| 1134 | return ( |
| 1135 | <ComboBox |
| 1136 | items={list.items} |
| 1137 | inputValue={list.filterText} |
| 1138 | onInputChange={list.setFilterText}> |
| 1139 | <Label>SW Characters</Label> |
| 1140 | <Input /> |
| 1141 | <Button>{'<'}</Button> |
| 1142 | <Popover> |
| 1143 | <ListBox>{item => <ListBoxItem id={item.id}>{item.name}</ListBoxItem>}</ListBox> |
| 1144 | </Popover> |
| 1145 | </ComboBox> |
| 1146 | ); |
| 1147 | } |
| 1148 | |
| 1149 | let {container, queryByRole} = render(<AsyncComboBox />); |
| 1150 | let comboboxTester = testUtilUser.createTester('ComboBox', {root: container}); |
nothing calls this directly
no test coverage detected