Skip to content

Commit

Permalink
ability to set address from outside of component
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Yaskevich committed Jun 26, 2016
1 parent 4752262 commit 3b62a8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ const GooglePlacesAutocomplete = React.createClass({
return null;
},
render() {
let { onChangeText, onFocus, ...userProps } = this.props.textInputProps;
let { value, onChangeText, onFocus, ...userProps } = this.props.textInputProps;
return (
<View
style={[defaultStyles.container, this.props.styles.container]}
Expand All @@ -565,7 +565,7 @@ const GooglePlacesAutocomplete = React.createClass({
autoFocus={this.props.autoFocus}
style={[defaultStyles.textInput, this.props.styles.textInput]}
onChangeText={onChangeText ? text => {this._onChangeText(text); onChangeText(text)} : this._onChangeText}
value={this.state.text}
value={value || this.state.text}
placeholder={this.props.placeholder}
onFocus={onFocus ? () => {this._onFocus(); onFocus()} : this._onFocus}
clearButtonMode="while-editing"
Expand Down

0 comments on commit 3b62a8f

Please sign in to comment.