fix: return old filter but with lower case

This commit is contained in:
RadoslavDimchev 2023-09-04 08:43:20 +03:00
parent 745828b863
commit 76043bd0c1
1 changed files with 1 additions and 1 deletions

View File

@ -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>) => {