React-native-google-places-autocomplete: Showing default value in autocomplete

Created on 13 Jun 2020  路  1Comment  路  Source: FaridSafi/react-native-google-places-autocomplete

<GooglePlacesAutocomplete
  placeholder='Address'
  minLength={2}
  autoFocus={false}
  returnKeyType={'default'}
  fetchDetails={true}
  onPress={this.props.onSelectAddress}
  getDefaultValue={() => this.state.val}
  query={{
    key: '***somekey*****',
    language: 'en',
  }}
  styles={{}}
/>
bug

Most helpful comment

I've solved this using, by the way this function still need to be fix getDefaultValue to show default value even after update state of component

textInputProps={{
                value: this.state.text,
                onChangeText: (text) => {this.props.handleAddressOnKeyUp(text)}
              }}

this might help someone else on stackoverflow issue

>All comments

I've solved this using, by the way this function still need to be fix getDefaultValue to show default value even after update state of component

textInputProps={{
                value: this.state.text,
                onChangeText: (text) => {this.props.handleAddressOnKeyUp(text)}
              }}

this might help someone else on stackoverflow issue

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nikohosn picture nikohosn  路  3Comments

aymkin picture aymkin  路  4Comments

tezahzulueta picture tezahzulueta  路  3Comments

macs03 picture macs03  路  3Comments

GervaisYO picture GervaisYO  路  4Comments