Closed lavarajallu closed 2 years ago
Can you please describe the problem in more depth? Currently it's hard to understand what are you trying to achieve.
I believe that this user is trying to get the text from the input when the user clicks "enter". If they do not explicitly select an option from the list, he still wants to be able to access the text contained in the search bar. I am also curious if this functionality exists.
Oops, just saw #38 , the solution there seems to do the trick!
Closed because workaround exists: https://github.com/sickdyd/react-search-autocomplete/issues/38
If I use the method like
<ReactSearchAutocomplete items={items} onSearch={handleOnSearch} onHover={handleOnHover} onSelect={handleOnSelect} onFocus={handleOnFocus} onKeyUp={handleKeyUp} onClear={handleClear} autoFocus formatResult={formatResult} />
const handleKeyUp = (e) => { console.log("event: ", e); if (e.charCode === 13 || e.key === "Enter") { console.log(
Enter$
, e); handleOnSearch();};
is it possible to work in this module