From c61e5724f2fac0e77d250734426a0bd34c00a7ec Mon Sep 17 00:00:00 2001 From: tonibardina Date: Fri, 9 Sep 2022 15:01:34 +0200 Subject: [PATCH 1/8] Added event object to `onBlur` method sent through `textInputProps` --- GooglePlacesAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index cd03253..d697626 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -829,7 +829,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { onBlur ? (e) => { _onBlur(e); - onBlur(); + onBlur(e); } : _onBlur } From f9846c86081e2c2ee94c73e5af1500ad6e387562 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Fri, 16 Sep 2022 07:50:07 +0530 Subject: [PATCH 2/8] docs: upd rn-elements "Input" component docs link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8694bbf..b8e3690 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/input). +This is an example using the Text Input from [`react-native-elements`](https://reactnativeelements.com/docs/components/input). ```js import React from 'react'; From a71b64d1386489c4cbe3e08236c44ac24cdb7e56 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Sat, 17 Sep 2022 22:41:56 +0530 Subject: [PATCH 3/8] feat: add inbetweenCompo prop --- GooglePlacesAutocomplete.d.ts | 1 + GooglePlacesAutocomplete.js | 2 ++ README.md | 1 + 3 files changed, 4 insertions(+) diff --git a/GooglePlacesAutocomplete.d.ts b/GooglePlacesAutocomplete.d.ts index 1fbd5f9..15d5a8a 100644 --- a/GooglePlacesAutocomplete.d.ts +++ b/GooglePlacesAutocomplete.d.ts @@ -390,6 +390,7 @@ 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 cd03253..4ee5895 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -840,6 +840,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { {_renderRightButton()} )} + {props.inbetweenCompo} {_getFlatList()} {props.children} @@ -859,6 +860,7 @@ 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 b8e3690..43d129c 100644 --- a/README.md +++ b/README.md @@ -236,6 +236,7 @@ _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. | | | From 5c411d60eeca2070a52aeb795c09fced417a7b86 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Sun, 18 Sep 2022 01:04:40 +0530 Subject: [PATCH 4/8] fix: fix irregular separator height --- GooglePlacesAutocomplete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index cd03253..a087a34 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -17,6 +17,7 @@ import { Keyboard, Platform, ScrollView, + StyleSheet, Text, TextInput, TouchableHighlight, @@ -54,7 +55,7 @@ const defaultStyles = { }, description: {}, separator: { - height: 0.5, + height: StyleSheet.hairlineWidth, backgroundColor: '#c8c7cc', }, poweredContainer: { From 88fd9c480b9797a91742efa94195e2aa9877cd81 Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Mon, 19 Sep 2022 19:19:50 +0530 Subject: [PATCH 5/8] add event object for `onFocus ` method in `textInputProps` --- GooglePlacesAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index d697626..7f30848 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -821,7 +821,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { onFocus ? () => { _onFocus(); - onFocus(); + onFocus(e); } : _onFocus } From 23334b13945152400e24acf782ec544d4bdadb3c Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Mon, 31 Oct 2022 13:20:23 +0530 Subject: [PATCH 6/8] v2.5.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 465b925..2949e43 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-google-places-autocomplete", - "version": "2.4.1", + "version": "2.5.0", "description": "Customizable Google Places autocomplete component for iOS and Android React-Native apps", "main": "GooglePlacesAutocomplete.js", "types": "GooglePlacesAutocomplete.d.ts", From 909b5d2ef6720a7db95b9d22f25c79d03e422143 Mon Sep 17 00:00:00 2001 From: Willham12 <87827270+Willham12@users.noreply.github.com> Date: Wed, 2 Nov 2022 05:41:24 +0100 Subject: [PATCH 7/8] fixed event object for onFocus method in textInputProps --- GooglePlacesAutocomplete.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GooglePlacesAutocomplete.js b/GooglePlacesAutocomplete.js index 7f30848..9449f8d 100644 --- a/GooglePlacesAutocomplete.js +++ b/GooglePlacesAutocomplete.js @@ -819,7 +819,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => { placeholder={props.placeholder} onFocus={ onFocus - ? () => { + ? (e) => { _onFocus(); onFocus(e); } From ec5ed1bd5d119657ddd9b5f11c119781bd295c7e Mon Sep 17 00:00:00 2001 From: Ashutosh Khanduala Date: Wed, 2 Nov 2022 14:06:28 +0530 Subject: [PATCH 8/8] hotfix: #853 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2949e43..cb65785 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-google-places-autocomplete", - "version": "2.5.0", + "version": "2.5.1", "description": "Customizable Google Places autocomplete component for iOS and Android React-Native apps", "main": "GooglePlacesAutocomplete.js", "types": "GooglePlacesAutocomplete.d.ts",