diff --git a/GooglePlacesAutocomplete.d.ts b/GooglePlacesAutocomplete.d.ts index 7e823263..93a0e60c 100644 --- a/GooglePlacesAutocomplete.d.ts +++ b/GooglePlacesAutocomplete.d.ts @@ -390,7 +390,6 @@ interface GooglePlacesAutocompleteProps { region?: string; components?: string; }; - inbetweenCompo?: React.ReactNode; isRowScrollable?: boolean; keyboardShouldPersistTaps?: 'never' | 'always' | 'handled'; /** use the ListEmptyComponent prop when no autocomplete results are found. */ diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index 1ea19337..a4d71ab8 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -18,7 +18,6 @@ import { Platform, Pressable, ScrollView, - StyleSheet, Text, TextInput, View, @@ -55,7 +54,7 @@ const defaultStyles = { }, description: {}, separator: { - height: StyleSheet.hairlineWidth, + height: 0.5, backgroundColor: '#c8c7cc', }, poweredContainer: { @@ -848,9 +847,9 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { placeholder={props.placeholder} onFocus={ onFocus - ? (e) => { + ? () => { _onFocus(); - onFocus(e); + onFocus(); } : _onFocus } @@ -858,7 +857,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { onBlur ? (e) => { _onBlur(e); - onBlur(e); + onBlur(); } : _onBlur } @@ -869,7 +868,6 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { {_renderRightButton()} )} - {props.inbetweenCompo} {_getFlatList()} {props.children} @@ -889,7 +887,6 @@ GooglePlacesAutocomplete.propTypes = { GooglePlacesDetailsQuery: PropTypes.object, GooglePlacesSearchQuery: PropTypes.object, GoogleReverseGeocodingQuery: PropTypes.object, - inbetweenCompo: PropTypes.object, isRowScrollable: PropTypes.bool, keyboardShouldPersistTaps: PropTypes.oneOf(['never', 'always', 'handled']), listEmptyComponent: PropTypes.func, diff --git a/README.md b/README.md index 18bd08c0..7f604afd 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ export default GooglePlacesInput;
Click to expand -This is an example using the Text Input from [`react-native-elements`](https://reactnativeelements.com/docs/components/input). +This is an example using the Text Input from [`react-native-elements`](https://reactnativeelements.com/docs/input). ```js import React from 'react'; @@ -236,7 +236,6 @@ _This list is a work in progress. PRs welcome!_ | GooglePlacesSearchQuery | object | "query" object for the Google Places Nearby API (when you use current location to find nearby places) | `{ rankby: 'distance', type: 'restaurant' }` | | | GoogleReverseGeocodingQuery | object | "query" object for the Google Geocode API (when you use current location to get the current address) | | | | isRowScrollable | boolean | enable/disable horizontal scrolling of a list result https://reactnative.dev/docs/scrollview#scrollenabled | true | -|inbetweenCompo|React.ReactNode|Insert a ReactNode in between the search bar and the search results Flatlist | keepResultsAfterBlur | boolean | show list of results after blur | false | true \| false | | keyboardShouldPersistTaps | string | Determines when the keyboard should stay visible after a tap https://reactnative.dev/docs/scrollview#keyboardshouldpersisttaps | 'always' | 'never' \| 'always' \| 'handled' | | listEmptyComponent | function | use FlatList's ListEmptyComponent prop when no autocomplete results are found. | | | diff --git a/package.json b/package.json index cb657852..465b9250 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-google-places-autocomplete", - "version": "2.5.1", + "version": "2.4.1", "description": "Customizable Google Places autocomplete component for iOS and Android React-Native apps", "main": "GooglePlacesAutocomplete.js", "types": "GooglePlacesAutocomplete.d.ts",