We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when a user types a suggestion, highlights an option with up/down keys, then presses enter, the selection should trigger the onChange method in the inputProps object, as referenced here: https://www.npmjs.com/package/react-autosuggest#inputpropsonchange-required
c
Observed behaviour: Nothing happens and nothing logs to the console
Expected behaviour: onChange should be called and 'enter' should be logged to the console
The text was updated successfully, but these errors were encountered:
onChange is called only when the input value changes. In your repro, the input value changes when you press Down, but not when you press Enter.
onChange
It will be called with method === "enter" if you hover a suggestion with a mouse (this doesn't change the input value), and then press Enter.
method === "enter"
You might want to use onSuggestionSelected.
onSuggestionSelected
Sorry, something went wrong.
No branches or pull requests
Description
when a user types a suggestion, highlights an option with up/down keys, then presses enter, the selection should trigger the onChange method in the inputProps object, as referenced here: https://www.npmjs.com/package/react-autosuggest#inputpropsonchange-required
CodePen: https://codepen.io/CharlesHill/pen/gBRzoq
Reproduction Steps
c
, and wait for suggestions to appearObserved behaviour: Nothing happens and nothing logs to the console
Expected behaviour: onChange should be called and 'enter' should be logged to the console
The text was updated successfully, but these errors were encountered: