fullstackreact / google-maps-react

Companion code to the "How to Write a Google Maps React Component" Tutorial
https://www.fullstackreact.com/articles/how-to-write-a-google-maps-react-component/
MIT License
1.64k stars 819 forks source link

Item click inside the InfoWindow #517

Open jasbirsmindfiresolutions opened 3 years ago

jasbirsmindfiresolutions commented 3 years ago

Hi,

I have added a button in the info window, but i cant perform any action on click of that button.

amandarose42 commented 3 years ago

I am having this same issue!

My workaround for now is using onOpen to do any button commands when using InfoWindow.

(but would like to insert button and trigger from there in the future!)

josepBasetis commented 2 years ago

i'm having this same issue. any solution ?

itsmejasbirsingh commented 2 years ago

No, even font family gets changed when try to open the info window.

you may look out to an another library, but i did'nt tried it.

https://www.npmjs.com/package/react-google-maps

RajThapa7 commented 1 month ago

We can work around this by calling a function on the onOpen event on the InfoWindow component; inside that function, we can render the components where we want the click events. Here is a source to the code sandbox: https://codesandbox.io/p/sandbox/k0xrxok983