react-expand
Advanced tools
Comparing version 1.1.0 to 1.1.1
@@ -378,6 +378,6 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
_this.setBodyClassName = function () { | ||
if (document.body.classList.contains("modal-open") && !_this.context.isExpanded(_this.props.modalId)) { | ||
if (document.body.classList.contains("modal-open") && !_this.container.childElementCount) { | ||
document.body.classList.remove("modal-open"); | ||
} | ||
if (!document.body.classList.contains("modal-open") && _this.context.isExpanded(_this.props.modalId)) { | ||
if (!document.body.classList.contains("modal-open") && _this.container.childElementCount) { | ||
document.body.classList.add("modal-open"); | ||
@@ -404,2 +404,4 @@ } | ||
document.body.appendChild(this.container); | ||
} else { | ||
this.container = document.getElementById(Modal.containerName); | ||
} | ||
@@ -406,0 +408,0 @@ this.setBodyClassName(); |
{ | ||
"name": "react-expand", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "Simple element expand state controlling", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
@@ -59,3 +59,3 @@ # React Expand | ||
<ModalOpenButton modalId="some-id" {...HTMLButtonElementProps}/> | ||
<Modal modalId="some-id" defaultOpened closeOnOutside wrapperProps={...HTMLDivElementProps}> | ||
<Modal modalId="some-id" defaultOpened closeOnOutside {...HTMLDivElementProps}> | ||
... | ||
@@ -62,0 +62,0 @@ <ModalCloseButton {...HTMLButtonElementProps}/> |
148902
2941