fix: return old filter but with lower case
This commit is contained in:
parent
745828b863
commit
76043bd0c1
|
@ -17,7 +17,7 @@ const AutocompleteInput = ({ index }: AutocompleteInputProps) => {
|
|||
const dispatch = useDispatch()
|
||||
|
||||
useEffect(() => {
|
||||
setSuggestions(wordlist.filter(w => w.includes(word.toLowerCase())))
|
||||
setSuggestions(wordlist.filter(w => w.startsWith(word.toLowerCase())))
|
||||
}, [word])
|
||||
|
||||
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||
|
|
Loading…
Reference in New Issue