Google Places Autocomplete not showing up

前端 未结 3 1985
难免孤独
难免孤独 2020-12-15 03:41

I\'ve been working on this for hours trying to figure out why the supposedly simple autocomplete wasn\'t showing up.

It turns out that in my code, the input element i

3条回答
  •  天命终不由人
    2020-12-15 04:02

    For anybody else who may be stuck or having difficulty with this, ignore the 'autocomplete="no"' value, and don't use 'display: block' to show the '.pac-container'.

    go into your chrome devtools and make sure you can see the .pac-container div. set the z-index of that div in your css. When there is a searched value, google will change the display to block and handle the showing and hiding, you just have to worry about the z-index.

提交回复
热议问题