-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
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
Allow custom input values #652
Comments
Ran into a similar situation, though I wasn't seeing I got the desired behavior by:
Pasting this here in case it helps anyone and to invoke Cunningham's Law for feedback/improvements.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In my project, we want to also allow users to input values that are not returned in the suggestions list. We've instructed our users to save their custom input by hitting enter. However, because
onSuggestionSelected
callsonKeyDown
with the original event and no additional data, we had to resort to using a local variable to track the last value selected so that we could figure out whether theonKeyDown
event came fromonSuggestionSelected
or not.I think the easiest way to get around this would be to explicitly include the suggestion or
null
in the params passed toonKeyDown
, though I could also see modifying the event object to add this data, or simply adding an additional config parameter to allow this mode.The text was updated successfully, but these errors were encountered: