Skip to content

Commit

Permalink
Merge pull request reactjs#16 from arasmussen/master
Browse files Browse the repository at this point in the history
[fixed] ModalPortal's componentWillReceiveProps
  • Loading branch information
ryanflorence committed Feb 26, 2015
2 parents 6fd8456 + 1b8e2d0 commit db8b725
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/components/ModalPortal.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,10 @@ var ModalPortal = module.exports = React.createClass({
// Focus only needs to be set once when the modal is being opened
if (!this.props.isOpen && newProps.isOpen) {
this.setFocusAfterRender(true);
}

if (newProps.isOpen === true)
this.open();
else if (newProps.isOpen === false)
} else if (this.props.isOpen && !newProps.isOpen) {
this.close();
}
},

componentDidUpdate: function () {
Expand Down

0 comments on commit db8b725

Please sign in to comment.