Skip to content

Commit

Permalink
feat(Modal): pass event object to toggle prop (#903)
Browse files Browse the repository at this point in the history
  • Loading branch information
fantua authored and TheSharpieOne committed Mar 16, 2018
1 parent b1f6005 commit f6aacfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Modal.js
Expand Up @@ -163,13 +163,13 @@ class Modal extends React.Component {
const container = this._dialog;

if (e.target && !container.contains(e.target) && this.props.toggle) {
this.props.toggle();
this.props.toggle(e);
}
}

handleEscape(e) {
if (this.props.isOpen && this.props.keyboard && e.keyCode === 27 && this.props.toggle) {
this.props.toggle();
this.props.toggle(e);
}
}

Expand Down

0 comments on commit f6aacfa

Please sign in to comment.