react-combo-modal
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -55,15 +55,14 @@ 'use strict'; | ||
value: function componentDidUpdate(prevProps) { | ||
// this needs to always run | ||
this.renderLayer(); | ||
if (this.props.open) { | ||
document.body.style.overflow = 'hidden'; | ||
} else { | ||
document.body.style.overflow = 'auto'; | ||
if (prevProps.open !== this.props.open) { | ||
if (!prevProps.open && this.props.open) { | ||
document.body.style.overflow = 'hidden'; | ||
this.addEventListeners(); | ||
} else { | ||
document.body.style.overflow = 'auto'; | ||
this.removeEventListeners(); | ||
} | ||
} | ||
if (!prevProps.open && this.props.open) { | ||
this.addEventListeners(); | ||
} else if (prevProps.open && !this.props.open) { | ||
this.removeEventListeners(); | ||
} | ||
} | ||
@@ -70,0 +69,0 @@ }, { |
{ | ||
"name": "react-combo-modal", | ||
"version": "1.0.3", | ||
"keywords": "react, modal, react-component", | ||
"version": "1.0.4", | ||
"keywords": ["react", "modal", "react-component"], | ||
"description": "React modal component", | ||
@@ -6,0 +6,0 @@ "main": "./lib/Modal.jsx", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13344
0