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

Suggestions disappear when input loses focus

Open picosam opened this issue 6 years ago • 4 comments

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?

picosam avatar Jun 18 '18 10:06 picosam

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.

Huanzhang89 avatar Jul 11 '18 14:07 Huanzhang89

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 = () => {};
    }}

dannyblv avatar Apr 14 '19 14:04 dannyblv

@Danny-weebo where do add this ?

udielenberg avatar Oct 30 '19 16:10 udielenberg

@Danny-weebo where do add this ?

In autocomplete component

dannyblv avatar Nov 06 '19 07:11 dannyblv