Skip to content

Commit

Permalink
[fixed] ModalPortal's componentWillReceiveProps
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Rasmussen committed Jan 19, 2015
1 parent 6fd8456 commit 1b8e2d0
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 1b8e2d0

Please sign in to comment.