react-native-places-input
Advanced tools
Comparing version
# Changelog | ||
## 1.1.1 | ||
New configuration props: | ||
* **onChangeText** - Method triggered when TextInput is changed. Returning query and this. | ||
## 1.1.0 | ||
@@ -3,0 +6,0 @@ New configuration props: |
@@ -28,3 +28,8 @@ import React, { Component } from 'react'; | ||
style={[styles.input, this.props.stylesInput]} | ||
onChangeText={query => this.setState({ query }, () => this.onPlaceSearch())} | ||
onChangeText={query => { | ||
this.setState({ query }, () => { | ||
this.onPlaceSearch(); | ||
this.props.onChangeText && this.props.onChangeText(query, this); | ||
}); | ||
}} | ||
value={this.state.query} | ||
@@ -201,2 +206,3 @@ onFocus={() => this.setState({ showList: true })} | ||
onSelect: PropTypes.func, | ||
onChangeText: PropTypes.func, | ||
requiredCharactersBeforeSearch: PropTypes.number, | ||
@@ -203,0 +209,0 @@ requiredTimeBeforeSearch: PropTypes.number, |
{ | ||
"name": "react-native-places-input", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "author": "Kamil Thomas", |
@@ -7,2 +7,5 @@ # React Native Places Input | ||
## Latest changes | ||
## 1.1.1 | ||
New configuration props: | ||
* **onChangeText** - Method triggered when TextInput is changed. Returning query and this. | ||
## 1.1.0 | ||
@@ -14,12 +17,4 @@ New configuration props: | ||
* **queryTypes** - You may restrict results from a Place Autocomplete request to be of a certain type by passing a types parameter. | ||
## 1.0.9 | ||
Fixing an issue with sometimes not getting details about selected place. | ||
## 1.0.8 | ||
Fixed issue that in some cases list of places is not displayed. | ||
New configuration props: | ||
* **requiredCharactersBeforeSearch** - component wont fetch places unless string length is equal this prop. Default 2. | ||
* **requiredTimeBeforeSearch** - idle time on text input before component will fetch places. | ||
## Installation | ||
@@ -99,2 +94,3 @@ | ||
onSelect | func | | Function called when you select a place | ||
onChangeText | func | | Method triggered when TextInput is changed. Returning query and this. | ||
@@ -101,0 +97,0 @@ ## Examples |
15795
1.04%249
2.47%172
-2.27%