mui-places-autocomplete
mui-places-autocomplete copied to clipboard
Make background of suggestions non-transparent
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:
Here is what it normally looks like:
It seems to be blocking the outline of the lower input boxes, but not the label. Any ideas?
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:
Before search:
After search: