react-native-google-places-autocomplete icon indicating copy to clipboard operation
react-native-google-places-autocomplete copied to clipboard

How to trigger the list view display each time i focus the text input ?

Open bennyhan9 opened this issue 2 years ago • 0 comments

Describe the problem

I want to trigger the list view display each time i focus the text input (now it's triggered only when input changed)

  <GooglePlacesAutocomplete
    minLength={2}
    query={{
      key: SOME_KEY,
      language: 'en',
      types: 'address',
      components: 'country:us',
    }}
    ref={ref}
    value={value}
    isFocused={isFocus}
    onFocus={onFocused}
    onPress={handleSelection}
    textInputProps={{
      onChangeText: val => {
        setAddressText(val);
        if (val === '') {
          onClear();
        }
      },
    }}
    onFail={error => console.error(error)}
    placeholder='Enter Your home address'
    filterReverseGeocodingByTypes={['postal_code']}
    listViewDisplayed="auto"
    fetchDetails={true}
    styles={inputStyle}
  />

bennyhan9 avatar Nov 16 '22 08:11 bennyhan9