Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event listener on OverlayView and its children #18

Open
ihat opened this issue Feb 8, 2015 · 2 comments
Open

Event listener on OverlayView and its children #18

ihat opened this issue Feb 8, 2015 · 2 comments

Comments

@ihat
Copy link

ihat commented Feb 8, 2015

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?

@ihat
Copy link
Author

ihat commented Feb 10, 2015

@pieterv Any tips? Been banging my head against this. Thanks!

@mileszs
Copy link

mileszs commented Mar 12, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants