From 7100d43e2e3750e2506c78de32985974b915bb8f Mon Sep 17 00:00:00 2001 From: jasonmullins Date: Fri, 25 Sep 2015 10:57:27 -0400 Subject: [PATCH] added disabled prop --- README.md | 6 ++++++ src/Geosuggest.jsx | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 66733fa7..a79d34f9 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,12 @@ Default: `''` Add an additional class to the geosuggest container. +#### disabled +Type: `Boolean` +Default: `false` + +Defines whether the input is disabled. + #### location Type: `google.maps.LatLng` Default: `null` diff --git a/src/Geosuggest.jsx b/src/Geosuggest.jsx index 9774fd28..434707f8 100644 --- a/src/Geosuggest.jsx +++ b/src/Geosuggest.jsx @@ -25,7 +25,8 @@ var Geosuggest = React.createClass({ googleMaps: google && google.maps, onFocus: noop, onBlur: noop, - onChange: noop + onChange: noop, + disabled: false }; }, @@ -292,6 +293,7 @@ var Geosuggest = React.createClass({ type="text" value={this.state.userInput} placeholder={this.props.placeholder} + disabled={this.props.disabled} onKeyDown={this.onInputKeyDown} onChange={this.onInputChange} onFocus={this.onFocus}