Read selected place value from place object

This commit is contained in:
Kimmo Puputti 2018-08-09 10:46:36 +03:00
parent 815e1acb8c
commit 74f62bc101

View file

@ -253,7 +253,7 @@ class LocationAutocompleteInputImpl extends Component {
});
}
// Select the prediction in the given item. This will fetch the
// Select the prediction in the given item. This will fetch/read the
// place details and set it as the selected place.
selectItem(index) {
if (index < 0) {
@ -274,7 +274,7 @@ class LocationAutocompleteInputImpl extends Component {
.getPlaceDetails(prediction)
.then(place => {
this.props.input.onChange({
search: prediction.description,
search: place.address,
predictions: [],
selectedPlace: place,
});