I want to use Autocomplete
component for input tags. I\'m trying to get the tags and save them on a state so I can later save them on the database. I\'m using funct
@Dworo
For anyone that has a problem with displaying a selected item from dropdown in Input field.
I found a workaround. Basically you have to bind a inputValue
at onChage
for both Autocomplete
and TextField
, bad Material UI.
const [input, setInput] = useState('');
option}
inputValue={input}
onChange={(e,v) => setInput(v)}
style={{ width: 300 }}
renderInput={(params) => (
setInput(target.value)} variant="outlined" fullWidth />
)}
/>