react-native-google-places-autocomplete 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -390,6 +390,7 @@ interface GooglePlacesAutocompleteProps {
|
|
|
390
390
|
region?: string;
|
|
391
391
|
components?: string;
|
|
392
392
|
};
|
|
393
|
+
inbetweenCompo?: React.ReactNode;
|
|
393
394
|
isRowScrollable?: boolean;
|
|
394
395
|
keyboardShouldPersistTaps?: 'never' | 'always' | 'handled';
|
|
395
396
|
/** use the ListEmptyComponent prop when no autocomplete results are found. */
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
Keyboard,
|
|
18
18
|
Platform,
|
|
19
19
|
ScrollView,
|
|
20
|
+
StyleSheet,
|
|
20
21
|
Text,
|
|
21
22
|
TextInput,
|
|
22
23
|
TouchableHighlight,
|
|
@@ -54,7 +55,7 @@ const defaultStyles = {
|
|
|
54
55
|
},
|
|
55
56
|
description: {},
|
|
56
57
|
separator: {
|
|
57
|
-
height:
|
|
58
|
+
height: StyleSheet.hairlineWidth,
|
|
58
59
|
backgroundColor: '#c8c7cc',
|
|
59
60
|
},
|
|
60
61
|
poweredContainer: {
|
|
@@ -821,7 +822,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
|
|
|
821
822
|
onFocus
|
|
822
823
|
? () => {
|
|
823
824
|
_onFocus();
|
|
824
|
-
onFocus();
|
|
825
|
+
onFocus(e);
|
|
825
826
|
}
|
|
826
827
|
: _onFocus
|
|
827
828
|
}
|
|
@@ -829,7 +830,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
|
|
|
829
830
|
onBlur
|
|
830
831
|
? (e) => {
|
|
831
832
|
_onBlur(e);
|
|
832
|
-
onBlur();
|
|
833
|
+
onBlur(e);
|
|
833
834
|
}
|
|
834
835
|
: _onBlur
|
|
835
836
|
}
|
|
@@ -840,6 +841,7 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
|
|
|
840
841
|
{_renderRightButton()}
|
|
841
842
|
</View>
|
|
842
843
|
)}
|
|
844
|
+
{props.inbetweenCompo}
|
|
843
845
|
{_getFlatList()}
|
|
844
846
|
{props.children}
|
|
845
847
|
</View>
|
|
@@ -859,6 +861,7 @@ GooglePlacesAutocomplete.propTypes = {
|
|
|
859
861
|
GooglePlacesDetailsQuery: PropTypes.object,
|
|
860
862
|
GooglePlacesSearchQuery: PropTypes.object,
|
|
861
863
|
GoogleReverseGeocodingQuery: PropTypes.object,
|
|
864
|
+
inbetweenCompo: PropTypes.object,
|
|
862
865
|
isRowScrollable: PropTypes.bool,
|
|
863
866
|
keyboardShouldPersistTaps: PropTypes.oneOf(['never', 'always', 'handled']),
|
|
864
867
|
listEmptyComponent: PropTypes.func,
|
package/README.md
CHANGED
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
Version 2 of this library is now available. See more in the [releases](https://github.com/FaridSafi/react-native-google-places-autocomplete/releases/tag/v2.0.0) section.
|
|
10
10
|
|
|
11
|
+
# :warning: Maintainers Wanted 
|
|
12
|
+
We are in need of more people or companies willing to help. If you have enough time and knowledge, and want to become a maintainer, please open a new issue.
|
|
13
|
+
|
|
11
14
|
## Preview
|
|
12
15
|
|
|
13
16
|

|
|
@@ -182,7 +185,7 @@ export default GooglePlacesInput;
|
|
|
182
185
|
<details>
|
|
183
186
|
<summary>Click to expand</summary>
|
|
184
187
|
|
|
185
|
-
This is an example using the Text Input from [`react-native-elements`](https://reactnativeelements.com/docs/input).
|
|
188
|
+
This is an example using the Text Input from [`react-native-elements`](https://reactnativeelements.com/docs/components/input).
|
|
186
189
|
|
|
187
190
|
```js
|
|
188
191
|
import React from 'react';
|
|
@@ -233,6 +236,7 @@ _This list is a work in progress. PRs welcome!_
|
|
|
233
236
|
| GooglePlacesSearchQuery | object | "query" object for the Google Places Nearby API (when you use current location to find nearby places) | `{ rankby: 'distance', type: 'restaurant' }` | |
|
|
234
237
|
| GoogleReverseGeocodingQuery | object | "query" object for the Google Geocode API (when you use current location to get the current address) | | |
|
|
235
238
|
| isRowScrollable | boolean | enable/disable horizontal scrolling of a list result https://reactnative.dev/docs/scrollview#scrollenabled | true |
|
|
239
|
+
|inbetweenCompo|React.ReactNode|Insert a ReactNode in between the search bar and the search results Flatlist
|
|
236
240
|
| keepResultsAfterBlur | boolean | show list of results after blur | false | true \| false |
|
|
237
241
|
| keyboardShouldPersistTaps | string | Determines when the keyboard should stay visible after a tap https://reactnative.dev/docs/scrollview#keyboardshouldpersisttaps | 'always' | 'never' \| 'always' \| 'handled' |
|
|
238
242
|
| listEmptyComponent | function | use FlatList's ListEmptyComponent prop when no autocomplete results are found. | | |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-google-places-autocomplete",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"description": "Customizable Google Places autocomplete component for iOS and Android React-Native apps",
|
|
5
5
|
"main": "GooglePlacesAutocomplete.js",
|
|
6
6
|
"types": "GooglePlacesAutocomplete.d.ts",
|