Comparing version 2.6.0 to 2.6.1
@@ -203,5 +203,11 @@ import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2"; | ||
var firstMountChangeRef = React.useRef(false); | ||
useEffect(function () { | ||
if (asyncVisible !== undefined && status === STATUS_NONE) { | ||
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible); | ||
// Skip first render is invisible since it's nothing changed | ||
if (firstMountChangeRef.current || asyncVisible) { | ||
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible); | ||
} | ||
firstMountChangeRef.current = true; | ||
} | ||
@@ -208,0 +214,0 @@ }, [asyncVisible, status]); // ============================ Styles ============================ |
@@ -222,5 +222,11 @@ "use strict"; | ||
var firstMountChangeRef = React.useRef(false); | ||
(0, React.useEffect)(function () { | ||
if (asyncVisible !== undefined && status === _interface.STATUS_NONE) { | ||
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible); | ||
// Skip first render is invisible since it's nothing changed | ||
if (firstMountChangeRef.current || asyncVisible) { | ||
onVisibleChanged === null || onVisibleChanged === void 0 ? void 0 : onVisibleChanged(asyncVisible); | ||
} | ||
firstMountChangeRef.current = true; | ||
} | ||
@@ -227,0 +233,0 @@ }, [asyncVisible, status]); // ============================ Styles ============================ |
{ | ||
"name": "rc-motion", | ||
"version": "2.6.0", | ||
"version": "2.6.1", | ||
"description": "React lifecycle controlled motion library", | ||
@@ -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
92130
1960