Skip to content

Commit

Permalink
added editable ability to text input
Browse files Browse the repository at this point in the history
  • Loading branch information
julian khatibi committed Jul 11, 2018
1 parent ef980e5 commit 76ad395
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,6 +684,7 @@ export default class GooglePlacesAutocomplete extends Component {
{this._renderLeftButton()}
<TextInput
ref="textInput"
editable={this.props.editable}
returnKeyType={this.props.returnKeyType}
autoFocus={this.props.autoFocus}
style={[this.props.suppressDefaultStyles ? {} : defaultStyles.textInput, this.props.styles.textInput]}
Expand Down Expand Up @@ -747,7 +748,8 @@ GooglePlacesAutocomplete.propTypes = {
textInputHide: PropTypes.bool,
suppressDefaultStyles: PropTypes.bool,
numberOfLines: PropTypes.number,
onSubmitEditing: PropTypes.func
onSubmitEditing: PropTypes.func,
editable: PropTypes.bool
}
GooglePlacesAutocomplete.defaultProps = {
placeholder: 'Search',
Expand Down Expand Up @@ -792,7 +794,8 @@ GooglePlacesAutocomplete.defaultProps = {
textInputHide: false,
suppressDefaultStyles: false,
numberOfLines: 1,
onSubmitEditing: () => {}
onSubmitEditing: () => {},
editable: true
}

// this function is still present in the library to be retrocompatible with version < 1.1.0
Expand Down

0 comments on commit 76ad395

Please sign in to comment.