fmoo / react-typeahead

Pure react-based typeahead and typeahead-tokenizer
ISC License
677 stars 230 forks source link

Add option to clear typeahead on select option #245

Open BrodrickChilds opened 6 years ago

BrodrickChilds commented 6 years ago

Similar to #108 but a bit more basic.

We're using the typeahead component as a part of a custom multiselect form, where we don't want the values to appear as tokens but rather in another place in the form where you can interact with them. Anyways, this allows a straightforward way to clear the input after selecting an option.

Thanks!

aaroncrawford commented 11 months ago

For anyone that needs this in the future, another issue references how to do it with refs. Not documented, so hope this helps: https://github.com/fmoo/react-typeahead/issues/254