Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "update version" #2

Merged
merged 1 commit into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion GooglePlacesAutocomplete.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
11 changes: 4 additions & 7 deletions GooglePlacesAutocomplete.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
Platform,
Pressable,
ScrollView,
StyleSheet,
Text,
TextInput,
View,
Expand Down Expand Up @@ -55,7 +54,7 @@ const defaultStyles = {
},
description: {},
separator: {
height: StyleSheet.hairlineWidth,
height: 0.5,
backgroundColor: '#c8c7cc',
},
poweredContainer: {
Expand Down Expand Up @@ -848,17 +847,17 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
placeholder={props.placeholder}
onFocus={
onFocus
? (e) => {
? () => {
_onFocus();
onFocus(e);
onFocus();
}
: _onFocus
}
onBlur={
onBlur
? (e) => {
_onBlur(e);
onBlur(e);
onBlur();
}
: _onBlur
}
Expand All @@ -869,7 +868,6 @@ export const GooglePlacesAutocomplete = forwardRef((props, ref) => {
{_renderRightButton()}
</View>
)}
{props.inbetweenCompo}
{_getFlatList()}
{props.children}
</View>
Expand All @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export default GooglePlacesInput;
<details>
<summary>Click to expand</summary>

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';
Expand Down Expand Up @@ -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. | | |
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down