@uiw/react-overlay-trigger
Advanced tools
Comparing version 4.21.26 to 4.21.27
@@ -206,8 +206,18 @@ "use strict"; | ||
if (!isOpen) return; | ||
zIndex.current -= 1; | ||
if (zIndex.current <= 999) { | ||
zIndex.current = 999; | ||
} else { | ||
zIndex.current -= 1; | ||
} | ||
setIsOpen(false); | ||
} | ||
function _show() { | ||
var _triggerRef$current; | ||
if (isOpen) return; | ||
zIndex.current += 1; | ||
var nodeIndex = (_triggerRef$current = triggerRef.current) === null || _triggerRef$current === void 0 ? void 0 : _triggerRef$current.style.zIndex; | ||
if (nodeIndex) { | ||
zIndex.current = Number(nodeIndex) + 1; | ||
} else { | ||
zIndex.current += 1; | ||
} | ||
setIsOpen(true); | ||
@@ -258,2 +268,5 @@ } | ||
ref: triggerRef, | ||
style: { | ||
zIndex: zIndex.current | ||
}, | ||
className: [child.props.className, disabled ? "".concat(prefixCls, "-disabled") : null].filter(Boolean).join(' ').trim() | ||
@@ -260,0 +273,0 @@ }))), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactOverlay["default"], (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, overlayProps), {}, { |
@@ -166,8 +166,18 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
if (!isOpen) return; | ||
zIndex.current -= 1; | ||
if (zIndex.current <= 999) { | ||
zIndex.current = 999; | ||
} else { | ||
zIndex.current -= 1; | ||
} | ||
setIsOpen(false); | ||
} | ||
function _show() { | ||
var _triggerRef$current; | ||
if (isOpen) return; | ||
zIndex.current += 1; | ||
var nodeIndex = (_triggerRef$current = triggerRef.current) == null ? void 0 : _triggerRef$current.style.zIndex; | ||
if (nodeIndex) { | ||
zIndex.current = Number(nodeIndex) + 1; | ||
} else { | ||
zIndex.current += 1; | ||
} | ||
setIsOpen(true); | ||
@@ -217,2 +227,5 @@ } | ||
ref: triggerRef, | ||
style: { | ||
zIndex: zIndex.current | ||
}, | ||
className: [child.props.className, disabled ? prefixCls + "-disabled" : null].filter(Boolean).join(' ').trim() | ||
@@ -219,0 +232,0 @@ }))), /*#__PURE__*/_jsx(Overlay, _extends({}, overlayProps, { |
{ | ||
"name": "@uiw/react-overlay-trigger", | ||
"version": "4.21.26", | ||
"version": "4.21.27", | ||
"description": "OverlayTrigger component", | ||
@@ -47,5 +47,5 @@ "author": "Kenny Wong <wowohoo@qq.com>", | ||
"dependencies": { | ||
"@uiw/react-overlay": "^4.21.26", | ||
"@uiw/utils": "^4.21.26" | ||
"@uiw/react-overlay": "^4.21.27", | ||
"@uiw/utils": "^4.21.27" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
206057
2333
Updated@uiw/react-overlay@^4.21.27
Updated@uiw/utils@^4.21.27