16 lines
442 B
Plaintext
16 lines
442 B
Plaintext
|
|
<div {...getRootProps()}>
|
||
|
|
<Label {...getInputLabelProps()}>useAutocomplete</Label>
|
||
|
|
<Input {...getInputProps()} />
|
||
|
|
</div>
|
||
|
|
{groupedOptions.length > 0 ? (
|
||
|
|
<Listbox {...getListboxProps()}>
|
||
|
|
{groupedOptions.map((option, index) => {
|
||
|
|
const { key, ...optionProps } = getOptionProps({ option, index });
|
||
|
|
return (
|
||
|
|
<li key={key} {...optionProps}>
|
||
|
|
{option.title}
|
||
|
|
</li>
|
||
|
|
);
|
||
|
|
})}
|
||
|
|
</Listbox>
|
||
|
|
) : null}
|