fmoo / react-typeahead

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

Custom value #118

Open joeywisse opened 9 years ago

joeywisse commented 9 years ago

I've been looking for a way to just type wildly and hit enter to add custom tokens which are not supplied as options. Is this currently possible?

And thank you for this module.

joeywisse commented 9 years ago

Found the answer.

add allowCustomValues={1}

Thank you

fmoo commented 9 years ago

@joeywisse - apologies for not getting back to you sooner.

Does that API work well for you, or does it need any tweaks? Was there anything in the documentation we could have done better to make this more discoverable?

joeywisse commented 9 years ago

Working on a React project, this module fits in nicely. After trying with bootstrap-tokenizer this was really much easier to get started. Currently still working with the module to get my product finished, i'll let you know when I run into problems. Thank you.

Yesterday I searched the module code to find out about this functionality.

Correct me if I'm wrong but I didn't find "allowCustomValues" on this git's front-page. It coult be placed in the API section, e.g. near the "props.defaultValue".