Skip to content

Commit

Permalink
Merge pull request #3 from alan-cruz2/adding-back-setState
Browse files Browse the repository at this point in the history
Update FormsyAutoComplete.jsx
  • Loading branch information
alan-cruz2 authored Aug 25, 2017
2 parents 441ea8e + aa7e3e8 commit c207498
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/FormsyAutoComplete.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ const FormsyAutoComplete = createClass({
},

handleChange: function handleChange(event) {
this.setValue(event.currentTarget.value);
this.setState({ value: event.currentTarget.value }, () => this.setValue(event.currentTarget.value));
if (this.props.onChange) this.props.onChange(event);
},

handleUpdateInput: function handleUpdateInput(value) {
this.setValue(value);
this.setState({ value }, () => this.setValue(value));
if (this.props.onChange) this.props.onChange(null, value);
},

Expand Down

0 comments on commit c207498

Please sign in to comment.