Skip to content

Commit

Permalink
[changed] pass transition callbacks to Modal Transition
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Jul 23, 2015
1 parent abccff9 commit 58eaab0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ const Modal = React.createClass({

render() {
let { children, animation, backdrop, ...props } = this.props;
let { onExit, onExiting, onEnter, onEntering, onEntered } = props;

let show = !!props.show;

Expand All @@ -166,7 +167,12 @@ const Modal = React.createClass({
unmountOnExit
in={show}
duration={Modal.TRANSITION_DURATION}
onExit={onExit}
onExiting={onExiting}
onExited={this.handleHidden}
onEnter={onEnter}
onEntering={onEntering}
onEntered={onEntered}
>
{ modal }
</Fade>
Expand Down Expand Up @@ -316,6 +322,9 @@ const Modal = React.createClass({

this.onHide();

if (this.props.onExited) {
this.props.onExited(...args);
}
},

handleBackdropClick(e) {
Expand Down

0 comments on commit 58eaab0

Please sign in to comment.