You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently using KeyboardAwareScrollView with react-native-google-places-autocomplete and only when the auto-complete component is within KeyboardAwareScrollView, the drop-down suggested addresses from Google does not respond to presses. When the aut0-complete component is without KeyboardAwareScrollView, the component works as expected.
The expected behavior is that when the suggested addresses are clicked, the clicked addresses can be used in the onPress property of react-native-google-places-autocomplete, but when the component is placed within KeyboardAwareScrollView, the suggested list disappears as soon as the list is clicked, and no addresses are selected or retrieved.
Standard GooglePlacesAutocomple from their repository:
<GooglePlacesAutocompleteplaceholder='Search'minLength={2}// minimum length of text to searchautoFocus={false}returnKeyType={'search'}// Can be left out for default return key https://facebook.github.io/react-native/docs/textinput.html#returnkeytypekeyboardAppearance={'light'}// Can be left out for default keyboardAppearance https://facebook.github.io/react-native/docs/textinput.html#keyboardappearancelistViewDisplayed={false}// true/false/undefinedfetchDetails={true}renderDescription={row=>row.description}// custom description renderonPress={(data,details=null)=>{// 'details' is provided when fetchDetails = trueconsole.log(data,details);}}textInputProps={}}getDefaultValue={()=>''}query={{// available options: https://developers.google.com/places/web-service/autocompletekey: googleAPIKeyForAutocomplete,language: 'en',// language of the resultsregion: "CA",// types: '(cities)' // default: 'geocode'types: '',}}currentLocation={true}// Will add a 'Current location' button at the top of the predefined places listcurrentLocationLabel="Current location"nearbyPlacesAPI='GooglePlacesSearch'// Which API to use: GoogleReverseGeocoding or GooglePlacesSearchGoogleReverseGeocodingQuery={{// available options for GoogleReverseGeocoding API : https://developers.google.com/maps/documentation/geocoding/intro}}GooglePlacesSearchQuery={{// available options for GooglePlacesSearch API : https://developers.google.com/places/web-service/searchrankby: 'distance',type: 'food'}}GooglePlacesDetailsQuery={{// available options for GooglePlacesDetails API : https://developers.google.com/places/web-service/detailsfields: 'formatted_address',}}filterReverseGeocodingByTypes={['locality','administrative_area_level_3']}// filter the reverse geocoding results by types - ['locality', 'administrative_area_level_3'] if you want to display only citiespredefinedPlaces={[]}enablePoweredByContainer={false}debounce={200}// debounce the requests in ms. Set to 0 to remove debounce. By default 0ms.renderLeftButton={()=>{}}renderRightButton={()=>{}}/>
The text was updated successfully, but these errors were encountered:
I'm currently using
KeyboardAwareScrollView
withreact-native-google-places-autocomplete
and only when the auto-complete component is withinKeyboardAwareScrollView
, the drop-down suggested addresses from Google does not respond to presses. When the aut0-complete component is withoutKeyboardAwareScrollView
, the component works as expected.The expected behavior is that when the suggested addresses are clicked, the clicked addresses can be used in the
onPress
property ofreact-native-google-places-autocomplete
, but when the component is placed withinKeyboardAwareScrollView
, the suggested list disappears as soon as the list is clicked, and no addresses are selected or retrieved.I placed
react-native-google-places-autocomplete
withinFormik
:Standard
GooglePlacesAutocomple
from their repository:The text was updated successfully, but these errors were encountered: