Skip to content

Commit

Permalink
[HNY] handleValueClick triggers removeValue and resets inputValue
Browse files Browse the repository at this point in the history
  • Loading branch information
christineyen committed Jun 1, 2017
1 parent a3a0c84 commit 1cafc27
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "react-select-allow-create",
"version": "1.0.0-beta11.15",
"version": "1.0.0-beta11.16",
"description": "A Select control built with and for ReactJS",
"main": "lib/Select.js",
"style": "dist/react-select.min.css",
Expand Down
2 changes: 2 additions & 0 deletions src/Select.js
Expand Up @@ -538,6 +538,8 @@ const Select = React.createClass({

handleValueClick (option, event) {
if (!this.props.onValueClick) return;
this.removeValue(option);
this.setState({ inputValue: option.label });
this.props.onValueClick(option, event);
},

Expand Down

0 comments on commit 1cafc27

Please sign in to comment.