Anonymous
React Native панель поиска Google с автозаполнением в iOS, удаление значка серого креста
Сообщение
Anonymous » 09 ноя 2024, 23:00
В моем приложении React Native я использую плагин реакции-native-google-places-autocomplete для поиска в Google, поэтому в iOS по умолчанию в строке поиска появляется серый значок для отметки галочки под изображением
https://github.com/FaridSafi/react-nati ... tocomplete
Мой код, как показано ниже
Код: Выделить всё
props.onPress(data, details)}
onFail={(error) => console.error('error-->', error)}
ref={ref}
query={{
key: '*****',
language: 'en',
region: 'ae',
components: 'country:ae',
types: 'geocode', // default: 'geocode'
}}
numberOfLines={1}
fetchDetails={true}
renderDescription={(row) => row.description}
renderRightButton={() => (
ref.current?.setAddressText('')}>
)}
nearbyPlacesAPI="GooglePlacesSearch" // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch
styles={{
textInputContainer: {
// backgroundColor: 'red',
marginLeft: 20,
marginRight: 20,
flexDirection: 'row',
borderRadius: 30,
borderColor: colors.white,
borderWidth: 1,
backgroundColor: colors.white,
},
textInput: {
height: 40,
color: colors.black,
fontSize: globals.font_14,
marginTop: 5,
backgroundColor: 'white',
},
predefinedPlacesDescription: {
color: colors.red,
},
poweredContainer: {
marginRight: 20,
marginLeft: 20,
},
row: {
marginHorizontal: 20,
},
separator: {
backgroundColor: '#c1bfc5',
height: 0.7,
},
}}
/>
Можно ли как-нибудь удалить серый значок отмены из компонента Google?
Подробнее здесь:
https://stackoverflow.com/questions/692 ... con-remove
1731182424
Anonymous
В моем приложении React Native я использую плагин реакции-native-google-places-autocomplete для поиска в Google, поэтому в iOS по умолчанию в строке поиска появляется серый значок для отметки галочки под изображением https://github.com/FaridSafi/react-native-google-places-autocomplete [img]https://i.sstatic.net/ 4645c.png[/img] Мой код, как показано ниже [code] props.onPress(data, details)} onFail={(error) => console.error('error-->', error)} ref={ref} query={{ key: '*****', language: 'en', region: 'ae', components: 'country:ae', types: 'geocode', // default: 'geocode' }} numberOfLines={1} fetchDetails={true} renderDescription={(row) => row.description} renderRightButton={() => ( ref.current?.setAddressText('')}> )} nearbyPlacesAPI="GooglePlacesSearch" // Which API to use: GoogleReverseGeocoding or GooglePlacesSearch styles={{ textInputContainer: { // backgroundColor: 'red', marginLeft: 20, marginRight: 20, flexDirection: 'row', borderRadius: 30, borderColor: colors.white, borderWidth: 1, backgroundColor: colors.white, }, textInput: { height: 40, color: colors.black, fontSize: globals.font_14, marginTop: 5, backgroundColor: 'white', }, predefinedPlacesDescription: { color: colors.red, }, poweredContainer: { marginRight: 20, marginLeft: 20, }, row: { marginHorizontal: 20, }, separator: { backgroundColor: '#c1bfc5', height: 0.7, }, }} /> [/code] Можно ли как-нибудь удалить серый значок отмены из компонента Google? Подробнее здесь: [url]https://stackoverflow.com/questions/69296174/react-native-google-autocomplete-search-bar-in-ios-gray-cross-icon-remove[/url]