Skip to content

Commit

Permalink
add event when input changes
Browse files Browse the repository at this point in the history
  • Loading branch information
khanghoang committed Sep 7, 2015
1 parent aaeb7b7 commit e6555ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Geosuggest.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ var Geosuggest = React.createClass({
types: null,
googleMaps: google && google.maps,
onFocus: noop,
onBlur: noop
onBlur: noop,
onInputPress: noop,
};
},

Expand Down Expand Up @@ -52,6 +53,7 @@ var Geosuggest = React.createClass({

this.setState({userInput: userInput}, function() {
this.showSuggests();
this.props.onInputChange(userInput)
}.bind(this));
},

Expand All @@ -61,6 +63,7 @@ var Geosuggest = React.createClass({
*/
update: function (value) {
this.setState({userInput: value});
this.props.onInputChange(userInput)
},

/*
Expand Down

0 comments on commit e6555ad

Please sign in to comment.