Change in state does not change default value
<GooglePlacesAutocomplete
placeholder='Address'
minLength={2}
autoFocus={false}
returnKeyType={'default'}
fetchDetails={true}
styles={{
textInputContainer: {
backgroundColor: 'rgba(0,0,0,0)',
borderTopWidth: 0,
borderBottomWidth: 1,
borderBottomColor: '#D9D5DC'
},
textInput: {
marginLeft: 0,
marginRight: 0,
color: '#000000',
fontSize: 13,
},
predefinedPlacesDescription: {
color: '#000000'
},
}}
query={{
// available options: https://developers.google.com/places/web-service/autocomplete
key: 'AIzaSyBAZBpWYMUskFgPU_LATPHd521AKJ3CEz4',
language: 'en', // language of the results
types: 'geocode' // default: 'geocode'
}}
placeholderTextColor='#575757'
onPress={(data, details = null) => { // 'details' is provided when fetchDetails = true
console.log(data, details);
this.onAddessSelect(data, details);
}}
currentLocation={false}
nearbyPlacesAPI='GooglePlacesSearch'
getDefaultValue={ () => this.state.address_line_1 ? this.state.address_line_1 + ' ' +
this.state.address_line_2 + ' ' +
this.state.suburb + ' ' +
this.state.city : ''
} />
Are you still working on this? I have the same issue
any news about that?
I'll take a look soon, sorry for the late response
what is the solution?
any solution to this?
Most helpful comment
Are you still working on this? I have the same issue