react-typeahead icon indicating copy to clipboard operation
react-typeahead copied to clipboard

Remove option from the options array when added (tokenizer)

Open soen opened this issue 10 years ago • 3 comments

Currently I'm able to search for an option already added, although I cannot add it twice. Is there a solution to hide an option from the options array, once it has been added?

soen avatar Apr 09 '15 09:04 soen

Not that I know of currently but sounds like a great feature to put in. I can't think why it should not be the default behavior.

thehuey avatar Apr 09 '15 17:04 thehuey

Yeah, there's actually at least one class state quirk in the UI the current behavior causes. The current behavior is kind of painful if you're trying to select all values that have a common prefix or something.

fmoo avatar Apr 09 '15 18:04 fmoo

+1. I could see a use case for adding the same value multiple times, but I think the default use case should be to not return results that have already been selected.

trshafer avatar Jun 07 '15 23:06 trshafer