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

Make background of suggestions non-transparent

Open samikool opened this issue 4 years ago • 1 comments

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?

samikool avatar Apr 04 '20 21:04 samikool

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

JackZheng10 avatar Apr 06 '20 22:04 JackZheng10