react-tagsinput
react-tagsinput copied to clipboard
Is there a way to accept input on , and not on tab
I want the user to enter comma separated email addressed and tab are not easy for the user to understand. I want to allow him to type multiple emails separated by a comma. Is there a way to do this?
Edit
I am doing this and it still doesn't work:
<ReactTags
tags={this.props.emails}
handleDelete={this.props.handleAlertEmailDelete}
handleInputBlur={this.props.handleAlertEmailAddition}
handleAddition={this.props.handleAlertEmailAddition}
addKeys={[188,186]}
placeholder="Enter emails separated by commas"
/>
I'm doing the same and it's not working for me either. From the docs, I think this is supposed to be how it's done. Am I wrong?
Can we add the tag if it is valid with the keys. ie normally it needs the key like comma or enter etc but is it possible to add the tag automatically if it is valid while typing
addKeys={[9, 13, 188, 186]}
This worked for me on Tab
, Enter
and Comma