React-autosuggest: Selecting multiple items?

Created on 28 Dec 2015  路  2Comments  路  Source: moroshko/react-autosuggest

Hi,
This component is wonderful and very cleanly designed! I'd like to know if there's a way I can use this component for selecting multiple comma separated items. Is this possible with the current set of options supported?

Most helpful comment

@ragebiswas Thanks!

Nope, I don't see a way to have a comma separated list. The component is designed to have a single value. You could, however, implement something like this:

  • User selects an item from the autosuggest
  • On selection, add the selected item to a list that is maintained outside of the autosuggest
  • After item is selected, clear the input, so that user could add another item to the list

If you decide to go with this approach, I'd encourage you to use 3.0 beta:

npm install [email protected] --save

All 2 comments

@ragebiswas Thanks!

Nope, I don't see a way to have a comma separated list. The component is designed to have a single value. You could, however, implement something like this:

  • User selects an item from the autosuggest
  • On selection, add the selected item to a list that is maintained outside of the autosuggest
  • After item is selected, clear the input, so that user could add another item to the list

If you decide to go with this approach, I'd encourage you to use 3.0 beta:

npm install [email protected] --save

Thanks for the reply @moroshko. I'll give it a shot :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cristian-sima picture cristian-sima  路  3Comments

ashwintastic picture ashwintastic  路  3Comments

gazpachu picture gazpachu  路  4Comments

icodejs picture icodejs  路  5Comments

mbulfair picture mbulfair  路  4Comments