@mexi/uikit 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
@@ -4648,13 +4648,13 @@ var DropdownMenu = function (_a) {
|
|
4648
4648
|
};
|
4649
4649
|
}, [targetRef, tooltipRef, hideTimeout, isHoveringOverTooltip, setIsOpen, openMenuTimeout, isOpen, isBottomNav]);
|
4650
4650
|
React.useEffect(function () {
|
4651
|
-
if (setMenuOpenByIndex && index !== undefined) {
|
4651
|
+
if (setMenuOpenByIndex && index !== undefined && showItemsOnMobile) {
|
4652
4652
|
setMenuOpenByIndex(function (prevValue) {
|
4653
4653
|
var _a;
|
4654
4654
|
return (__assign(__assign({}, prevValue), (_a = {}, _a[index] = isOpen, _a)));
|
4655
4655
|
});
|
4656
4656
|
}
|
4657
|
-
}, [isOpen, setMenuOpenByIndex, index]);
|
4657
|
+
}, [isOpen, setMenuOpenByIndex, index, showItemsOnMobile]);
|
4658
4658
|
return (React__default['default'].createElement(Box, __assign({ style: { display: "flex", alignItems: "center" }, ref: isBottomNav ? null : setTargetRef }, props),
|
4659
4659
|
React__default['default'].createElement(Box, { ref: isBottomNav ? setTargetRef : null }, children),
|
4660
4660
|
hasItems && (React__default['default'].createElement(StyledDropdownMenu, __assign({ style: styles.popper, ref: setTooltipRef }, attributes.popper, { "$isBottomNav": isBottomNav, "$isOpen": isOpen && ((isBottomNav && showItemsOnMobile) || !isBottomNav) }), items
|
package/dist/index.esm.js
CHANGED
@@ -4614,13 +4614,13 @@ var DropdownMenu = function (_a) {
|
|
4614
4614
|
};
|
4615
4615
|
}, [targetRef, tooltipRef, hideTimeout, isHoveringOverTooltip, setIsOpen, openMenuTimeout, isOpen, isBottomNav]);
|
4616
4616
|
useEffect(function () {
|
4617
|
-
if (setMenuOpenByIndex && index !== undefined) {
|
4617
|
+
if (setMenuOpenByIndex && index !== undefined && showItemsOnMobile) {
|
4618
4618
|
setMenuOpenByIndex(function (prevValue) {
|
4619
4619
|
var _a;
|
4620
4620
|
return (__assign(__assign({}, prevValue), (_a = {}, _a[index] = isOpen, _a)));
|
4621
4621
|
});
|
4622
4622
|
}
|
4623
|
-
}, [isOpen, setMenuOpenByIndex, index]);
|
4623
|
+
}, [isOpen, setMenuOpenByIndex, index, showItemsOnMobile]);
|
4624
4624
|
return (React__default.createElement(Box, __assign({ style: { display: "flex", alignItems: "center" }, ref: isBottomNav ? null : setTargetRef }, props),
|
4625
4625
|
React__default.createElement(Box, { ref: isBottomNav ? setTargetRef : null }, children),
|
4626
4626
|
hasItems && (React__default.createElement(StyledDropdownMenu, __assign({ style: styles.popper, ref: setTooltipRef }, attributes.popper, { "$isBottomNav": isBottomNav, "$isOpen": isOpen && ((isBottomNav && showItemsOnMobile) || !isBottomNav) }), items
|