react-places-autocomplete
react-places-autocomplete copied to clipboard
Solution for unfindable locations
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.