From e6555addbe3893b129488dc0623b7198036da35d Mon Sep 17 00:00:00 2001 From: KhangHoang Date: Mon, 7 Sep 2015 23:41:19 +0700 Subject: [PATCH] add event when input changes --- src/Geosuggest.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Geosuggest.jsx b/src/Geosuggest.jsx index f833bfde..f7a0c0eb 100644 --- a/src/Geosuggest.jsx +++ b/src/Geosuggest.jsx @@ -24,7 +24,8 @@ var Geosuggest = React.createClass({ types: null, googleMaps: google && google.maps, onFocus: noop, - onBlur: noop + onBlur: noop, + onInputPress: noop, }; }, @@ -52,6 +53,7 @@ var Geosuggest = React.createClass({ this.setState({userInput: userInput}, function() { this.showSuggests(); + this.props.onInputChange(userInput) }.bind(this)); }, @@ -61,6 +63,7 @@ var Geosuggest = React.createClass({ */ update: function (value) { this.setState({userInput: value}); + this.props.onInputChange(userInput) }, /*