react-places-autocomplete
react-places-autocomplete copied to clipboard
Not able to select suggestions by clicking (only tab works) react-places-autocomplete
When i use with phone browser, can't even select with clicking. In Computer browser only work with tab.
`import React, { useState } from 'react'; import PlacesAutocomplete, { geocodeByAddress, getLatLng, } from 'react-places-autocomplete';
const LocationSearchInput = () => { const [address, setAddress] = useState(''); const [coordinates, setCoordinates] = useState({ lat: null, lng: null }); const handleSelect = async value => { const results = await geocodeByAddress(value); const latLng = await getLatLng(results[0]) setAddress(value); setCoordinates(latLng) } return ( <PlacesAutocomplete value={this.state.address} onChange={setAddress} onSelect={handleSelect} > {({ getInputProps, suggestions, getSuggestionItemProps, loading }) => (
}`
+1. I'm also experiencing that clicking a suggestion doesn't change input value. In my case I'm using PlacesAutocomplete as a child with a react-leaflet control
also having this issue. clicking doesn't set the input value to the new address, only arrow keys and enter work
+1. Is there any alternate workaround to this?
+1. Is there any alternate workaround to this?
Might have some luck trying something like this, YMMV
any fixes?
any fixes?