react-places-autocomplete icon indicating copy to clipboard operation
react-places-autocomplete copied to clipboard

Solution for unfindable locations

Open kr1stjans opened this issue 2 years ago • 0 comments

Request a feature: Some islands are not findable with searchOptions locality and country, for example Fuertaventura, Spain (weird that Lanzarote works).

<PlacesAutocomplete value={location} onChange={setLocation} onSelect={handleSelect} highlightFirstSuggestion={true} searchOptions={{types: ['locality', 'country']}}>

Ideally there would be a type or a way to select Fuertaventura, however the issue is probably due to Google types, so I propose an option to always add input value to suggestions that user can select (if no autocomplete is found), because geocoder will then find correct location for fuertaventura.

Is there another way to achieve this?

Also a question, is there a way to send whole suggestion object to onSelect? Currently only description is sent and then I need to make additional request to Google. If whole object was sent, we could just use that object for everything.

kr1stjans avatar Jul 10 '23 13:07 kr1stjans