ErrorPro / react-google-autocomplete

React components for google places API.
MIT License
479 stars 113 forks source link

how to change the zIndex in the pac-container #224

Open nappalm opened 1 year ago

nappalm commented 1 year ago

I am trying to change the z-index of pac-container, but so far I have no solution to the problem. The component is mounted on a mui/material drawer and apparently sits underneath.

If I go directly to the element in the devTools and place a zIndex at the element.style level it works correctly, through the .pac-container class it does not work.

BiserSirakov commented 11 months ago

same problem +1

qamraaan commented 11 months ago

@nappalm, @BiserSirakov, I hope you guys are having a great day! I am also facing this issue. Have you managed to fix it?

qamraaan commented 11 months ago

.pac-container{ position: absolute; z-index: 999999; } Google provides .pac-container class by default. I added this to the index.css file and my issue was resolved.

asofiasbo commented 1 month ago

I'm facing the same issue. When the page is loaded the first time, the styles are ok. If the page is refreshed .pac-container goes transparent, "Powered by Google" disappears, it basically looses all styles.