handleClickOutside(event) {
    if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
      //alert('You clicked outside of me!');
      console.log(this.props.onClick);
      if (this.props.onClick)
        this.props.onClick();
    }
  }
/**
   * Alert if clicked on outside of element
   */
Alert if clicked on outside of element
Alert if clicked on outside of element
handleClickOutside(event) {
    if (this.wrapperRef && !this.wrapperRef.contains(event.target)) {
      console.log(this.props.onClick);
      if (this.props.onClick)
        this.props.onClick();
    }
  }
handleClickOutside ( event ) { if ( this . wrapperRef && ! this . wrapperRef . contains ( event . target ) ) { console . log ( this . props . onClick ) ; if ( this . props . onClick ) this . props . onClick ( ) ; } }
Alert if clicked on outside of element
Alert if clicked on outside of element
//alert('You clicked outside of me!');