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

onClick() not working in popup #36

Open
Shooshte opened this issue Jul 13, 2017 · 0 comments
Open

onClick() not working in popup #36

Shooshte opened this issue Jul 13, 2017 · 0 comments

Comments

@Shooshte
Copy link

This is my component:

import React, {Component} from 'react'
import PopoutWindow from 'react-popout'

class Help extends Component {
  render() {
    return (
      <PopoutWindow
        onClosing={this.props.closeHelpWindow}
        options={{width: '500px', height: '500px'}}
        ref={el => this._popup = el}
        >
      <div>
        
      // Other HTML content

      <div onClick={console.log('click')}>CLICK</div>

      <button onClick={() => {
        console.log('CLICK')
        this.props.closeHelpWindow
        this._popup.closeWindow
      }}>
        Ok
      </button>
    </div>
    </PopoutWindow>
    )
  }
}

export default Help

When I click the DIV or the button, nothing gets logged to the console (i used inspect on the popup window).

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

1 participant