react-googlemaps
react-googlemaps copied to clipboard
Event listener on OverlayView and its children
I'd like to register event listeners with elements contained within OverlayView. However, when I tried something similar to:
<OverlayView>
<div onClick={onClickHandler} />
</OverlayView>
the event handlers don't actually receive the events. Is there a nice way to resolve this?
@pieterv Any tips? Been banging my head against this. Thanks!
Are you still having trouble with this? I had this issue open today as I coded up an OverlayView. I was worried about it. I didn't have any issue. My code looks something like:
<OverlayView>
// ...
<a onClick={this._handleThisParticularClick}>This Particular</a>
</OverlayView>
In the React component:
_handleThisParticularClick(e) {
console.log('Works!');
},
And 'Works!' logs.