carbon-react 119.0.0 → 119.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -123,7 +123,7 @@ export const PopoverContainer = _ref4 => {
|
|
|
123
123
|
};
|
|
124
124
|
const handleClickAway = e => {
|
|
125
125
|
if (!isControlled) setIsOpenInternal(false);
|
|
126
|
-
if (onClose) onClose(e);
|
|
126
|
+
if (onClose && isOpen) onClose(e);
|
|
127
127
|
};
|
|
128
128
|
const handleClick = useClickAwayListener(handleClickAway, "mousedown");
|
|
129
129
|
return /*#__PURE__*/React.createElement(PopoverContainerWrapperStyle, {
|
|
@@ -134,7 +134,7 @@ const PopoverContainer = _ref4 => {
|
|
|
134
134
|
};
|
|
135
135
|
const handleClickAway = e => {
|
|
136
136
|
if (!isControlled) setIsOpenInternal(false);
|
|
137
|
-
if (onClose) onClose(e);
|
|
137
|
+
if (onClose && isOpen) onClose(e);
|
|
138
138
|
};
|
|
139
139
|
const handleClick = (0, _useClickAwayListener.default)(handleClickAway, "mousedown");
|
|
140
140
|
return /*#__PURE__*/_react.default.createElement(_popoverContainer.PopoverContainerWrapperStyle, {
|