react-places-autocomplete
react-places-autocomplete copied to clipboard
Suggestions disappear when input loses focus
I don't know if this is the desired behaviour, but I would like to know if I can override it: currently, if the input loses focus, the suggestions disappear. May you explain why this happens and if I can override it?
Are you trying to override it as a default behaviour or simply for better debugging during development? I have noticed that the suggestions used to disappear even when I switch to the chrome dev tools, but this seems to be fixed now so you should be able to tweak the styling for suggestions much easier.
you need to override the handleInputOnBlur
https://github.com/hibiken/react-places-autocomplete/blob/master/src/PlacesAutocomplete.js#L240,
ref={c => {
if (!c) return;
c.handleInputOnBlur = () => {};
}}
@Danny-weebo where do add this ?
@Danny-weebo where do add this ?
In autocomplete component