Skip to content

Allow custom input values #652

@ccemeraldeyes

Description

@ccemeraldeyes

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 calls onKeyDown 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 the onKeyDown event came from onSuggestionSelected or not.

I think the easiest way to get around this would be to explicitly include the suggestion or null in the params passed to onKeyDown, though I could also see modifying the event object to add this data, or simply adding an additional config parameter to allow this mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions