sickdyd / react-search-autocomplete

A search box that filters the provided array of objects
https://sickdyd.github.io/react-search-autocomplete
MIT License
216 stars 82 forks source link

onChange is not working #114

Open hasanboymarufjonov opened 10 months ago

hasanboymarufjonov commented 10 months ago

I can select input value by onSelect. But if I write something not on the list, I can't select it.

onChange={(e) => setName(e.target.value)}

onChange should work.

sajjademad commented 2 months ago

For anyone facing this problem: you can use onSearch instead of onChange. onSearch seems to be just a regular onChange with an extra argument (results array that matches the current text).