Giners / mui-places-autocomplete

Google Material Design (Material-UI) styled React component using Google Maps Places Autocomplete
MIT License
34 stars 26 forks source link

Make background of suggestions non-transparent #47

Open samikool opened 4 years ago

samikool commented 4 years ago

I'm working with this component right now, and I don't know if I'm missing something obvious, but the background for the suggestions is transparent. I've tried rendering divs, and boxes in the render target, but nothing seems to be doing it. Here is my code:

<MUIPlacesAutocomplete
    onSuggestionSelected={this.handlePlaceSelect}
    renderTarget={() => (<div/>)}
    textFieldProps={
    {   
      variant: "outlined", 
      fullWidth: true, 
      label: "Street Address",
      autoComplete: "none",
     }
    }
/>

Here is a picture of the problem: image

Here is what it normally looks like: image

It seems to be blocking the outline of the lower input boxes, but not the label. Any ideas?

JackZheng10 commented 4 years ago

I encountered the same error and used the renderTarget prop. You might be misunderstanding how it's used. I passed in what I want under the address search bar itself so that the results get rendered over it. Here's what my prop ended up looking like:

image

Before search: image

After search: image