()
| 1171 | } |
| 1172 | |
| 1173 | function AsyncComboBox() { |
| 1174 | let list = useAsyncList({ |
| 1175 | getKey: item => item.id, |
| 1176 | async load({filterText}) { |
| 1177 | let rows = itemsForFilterText(filterText); |
| 1178 | await new Promise(resolve => setTimeout(resolve, ASYNC_DELAY_MS)); |
| 1179 | return {items: rows}; |
| 1180 | } |
| 1181 | }); |
| 1182 | |
| 1183 | return ( |
| 1184 | <ComboBox |
| 1185 | items={list.items} |
| 1186 | inputValue={list.filterText} |
| 1187 | onInputChange={list.setFilterText}> |
| 1188 | <Label>SW Characters</Label> |
| 1189 | <Input /> |
| 1190 | <Button>{'<'}</Button> |
| 1191 | <Popover> |
| 1192 | <ListBox>{item => <ListBoxItem id={item.id}>{item.name}</ListBoxItem>}</ListBox> |
| 1193 | </Popover> |
| 1194 | </ComboBox> |
| 1195 | ); |
| 1196 | } |
| 1197 | |
| 1198 | let {container, queryByRole} = render(<AsyncComboBox />); |
| 1199 | let comboboxTester = testUtilUser.createTester('ComboBox', {root: container}); |
nothing calls this directly
no test coverage detected