How to use the react-overlays/lib/utils/addEventListener function in react-overlays

To help you get started, we’ve selected a few react-overlays examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / lib / util / RootCloseWrapper.js View on Github external
componentDidMount () {
    const doc = ownerDocument(this)

    this._onDocumentClickListener =
      addEventListener(doc, 'click', this.handleDocumentClick)

    this._onDocumentKeyupListener =
      addEventListener(doc, 'keyup', this.handleDocumentKeyUp)
  }
github instructure / instructure-ui / lib / util / RootCloseWrapper.js View on Github external
componentDidMount () {
    const doc = ownerDocument(this)

    this._onDocumentClickListener =
      addEventListener(doc, 'click', this.handleDocumentClick)

    this._onDocumentKeyupListener =
      addEventListener(doc, 'keyup', this.handleDocumentKeyUp)
  }