Skip to content

Commit

Permalink
Merge pull request #316 from ajkhatibi/master
Browse files Browse the repository at this point in the history
added editable ability to text input
  • Loading branch information
guilhermepontes authored Jul 13, 2018
2 parents 1e4e100 + 76ad395 commit 4899a64
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 @@ -689,6 +689,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 @@ -752,7 +753,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 @@ -797,7 +799,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 4899a64

Please sign in to comment.