我正在开发一个react原生应用程序,我必须将GooglePlacesAutocomplete放在Scrollview.This中,如下代码所示。
<ScrollView style={{flex: 1}>
<GooglePlacesAutocomplete
minLength={2}
nearbyPlacesAPI={'GooglePlacesSearch'}
debounce={400}
placeholder="Origin Address"
query={{
key: GOOGLE_MAPS_API_KEY,
language: 'en',
}}
onFail={error => console.log(error)}
enablePoweredByContainer={false}
onPress={(data, details = null) => {
console.log(details.geometry.location);
}}
fetchDetails={true}
returnkeyType={'search'}
/>
</ScrollView>Errors:VirtualizedLists不应该嵌套在具有相同方向的普通ScrollViews中,因为它可以破坏窗口和其他功能--使用另一个VirtualizedList支持的容器。
https://stackoverflow.com/questions/73955840
复制相似问题