@rc-component/portal
Advanced tools
Comparing version 1.0.0-8 to 1.0.0-9
@@ -42,5 +42,4 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray"; | ||
mergedRender = _React$useState2[0], | ||
setMergedRender = _React$useState2[1]; | ||
setMergedRender = _React$useState2[1]; // ====================== Should Render ====================== | ||
useScrollLocker(autoLock && open); // ====================== Should Render ====================== | ||
@@ -71,3 +70,5 @@ React.useEffect(function () { | ||
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; // ========================= Render ========================== | ||
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; // ========================= Locker ========================== | ||
useScrollLocker(autoLock && open && canUseDom() && (mergedContainer === defaultContainer || mergedContainer === document.body)); // ========================= Render ========================== | ||
// Do not render when nothing need render | ||
@@ -74,0 +75,0 @@ // When innerContainer is `undefined`, it may not ready since user use ref in the same render |
@@ -60,5 +60,4 @@ "use strict"; | ||
mergedRender = _React$useState2[0], | ||
setMergedRender = _React$useState2[1]; | ||
setMergedRender = _React$useState2[1]; // ====================== Should Render ====================== | ||
(0, _useScrollLocker.default)(autoLock && open); // ====================== Should Render ====================== | ||
@@ -89,3 +88,5 @@ React.useEffect(function () { | ||
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; // ========================= Render ========================== | ||
var mergedContainer = innerContainer !== null && innerContainer !== void 0 ? innerContainer : defaultContainer; // ========================= Locker ========================== | ||
(0, _useScrollLocker.default)(autoLock && open && (0, _canUseDom.default)() && (mergedContainer === defaultContainer || mergedContainer === document.body)); // ========================= Render ========================== | ||
// Do not render when nothing need render | ||
@@ -92,0 +93,0 @@ // When innerContainer is `undefined`, it may not ready since user use ref in the same render |
{ | ||
"name": "@rc-component/portal", | ||
"version": "1.0.0-8", | ||
"version": "1.0.0-9", | ||
"description": "React Portal Component", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
25195