react-native-google-places-autocomplete
react-native-google-places-autocomplete copied to clipboard
Scrollview with GooglePlacesAutocomplete doesn't work!
I'm having trouble using Google Places Autocomplete within a Modalize. When I type the address, it opens the ListView with the autocomplete suggestions. If the keyboard is open and I click on the ListView, it doesn't register the click. However, if I close the keyboard and then click, it works.
<Modalize
ref={modalizeRef}
alwaysOpen={modalHeight}
handlePosition="inside"
overlayStyle={{
backgroundColor: 'rgba(0, 0, 0, 0.5)',
}}
modalStyle={{
flex: 1,
borderTopLeftRadius: 10,
borderTopRightRadius: 10,
elevation: 20,
margin: 0,
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 8, // Aumentando o valor do height para uma sombra mais forte
},
shadowOpacity: 0.8, // Aumentando o valor do shadowOpacity para uma sombra mais forte
shadowRadius: 8, // Aumentando o valor do shadowRadius para uma sombra mais forte
}}
>
<View style={{
padding: 16,
flex: 1,
justifyContent: 'center',
}}>
<ScrollView
keyboardDismissMode="on-drag" // Adicione esta linha
contentContainerStyle={{
paddingBottom: 5,
minHeight: 400,
}}>
<View style={{ paddingBottom: 65, zIndex: 2 }}>
<GoogleSearchAddres
handleSelectDestination={handleSelectDestination}
handleRemoveMarkerDestination={handleRemoveMarkerDestination}
ajustarTamanhoBottomSearch={AjustarTamanhoBottomSearch}
ref={placesAutocompleteRef}
/>
</View>
</ScrollView>
</View>
</Modalize>
Did you manage to get this working? I have the same issue