react-combo-modal
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -55,15 +55,13 @@ 'use strict'; | ||
value: function componentDidUpdate(prevProps) { | ||
this.renderLayer(); | ||
if (prevProps.open !== this.props.open) { | ||
this.renderLayer(); | ||
if (this.props.open) { | ||
document.body.style.overflow = 'hidden'; | ||
} else { | ||
document.body.style.overflow = 'auto'; | ||
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 +68,0 @@ }, { |
{ | ||
"name": "react-combo-modal", | ||
"version": "1.0.1", | ||
"keywords": "react, modal, react-component", | ||
"version": "1.0.2", | ||
"keywords": ["react", "modal", "react-component"], | ||
"description": "React modal component", | ||
"main": "./lib/Modal.jsx", | ||
"scripts": { | ||
"start": "./node_modules/.bin/webpack-dev-server --config webpack.config.js --hot --progress --colors --port 8081 --open", | ||
"test": "mocha --compilers js:babel-core/register --require ./test/test.js \"test/**/*@(.js|.jsx)\"", | ||
"prepublish": "rm -rf ./lib && mkdir lib && ./node_modules/.bin/babel Components/Modal.jsx --out-file lib/Modal.jsx && ./node_modules/.bin/babel lib/Modal.jsx", | ||
"start": | ||
"./node_modules/.bin/webpack-dev-server --config webpack.config.js --hot --progress --colors --port 8081 --open", | ||
"test": | ||
"mocha --compilers js:babel-core/register --require ./test/test.js \"test/**/*@(.js|.jsx)\"", | ||
"prepublish": | ||
"rm -rf ./lib && mkdir lib && ./node_modules/.bin/babel Components/Modal.jsx --out-file lib/Modal.jsx && ./node_modules/.bin/babel lib/Modal.jsx", | ||
"postpublish": "rm -rf ./lib" | ||
@@ -12,0 +15,0 @@ }, |
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
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
13212
5
182
1