feat: focus input after select suggestion change

This commit is contained in:
RadoslavDimchev 2023-09-04 13:27:45 +03:00
parent 8de87c68c8
commit 0777a599ec
1 changed files with 4 additions and 0 deletions

View File

@ -21,6 +21,10 @@ const AutocompleteInput = ({ index }: AutocompleteInputProps) => {
}, [word]) }, [word])
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => { const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
if (!isFocused) {
handleInputFocus()
}
const value = e.target.value const value = e.target.value
const mnemonic = value.trim().split(' ') const mnemonic = value.trim().split(' ')
const mnemonicLength = mnemonic.length const mnemonicLength = mnemonic.length