We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fd8456 commit 1b8e2d0Copy full SHA for 1b8e2d0
lib/components/ModalPortal.js
@@ -45,12 +45,10 @@ var ModalPortal = module.exports = React.createClass({
45
// Focus only needs to be set once when the modal is being opened
46
if (!this.props.isOpen && newProps.isOpen) {
47
this.setFocusAfterRender(true);
48
- }
49
-
50
- if (newProps.isOpen === true)
51
this.open();
52
- else if (newProps.isOpen === false)
+ } else if (this.props.isOpen && !newProps.isOpen) {
53
this.close();
+ }
54
},
55
56
componentDidUpdate: function () {
0 commit comments