I tried making this myself, but it didn't work out well. Autocomplete on tags would be very useful since most sites that accept tags use autocomplete for the tag input (stackoverflow etc...).
Maybe the api could be like the following:
<Autocomplete
title="Fruits"
onChange={(newTags) => console.log(newTags)}
items={['Apple', 'Apricot', 'Banana', 'Cherry', 'Cucumber']}
>
{(props) => {
const { getInputProps, getRef, inputValues } = props
return (
<TagInput
inputProps={{ placeholder: 'Add trees...' }}
values={inputValues}
innerRef={getRef}
{...getInputProps()}
/>
)
}}
</Autocomplete>
I tried making this myself, but it didn't work out well. Autocomplete on tags would be very useful since most sites that accept tags use autocomplete for the tag input (stackoverflow etc...).
Maybe the api could be like the following: