@skyscanner/backpack-web 34.10.0 → 34.10.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.
|
@@ -93,15 +93,15 @@ const BpkPopover = ({
|
|
|
93
93
|
getFloatingProps,
|
|
94
94
|
getReferenceProps
|
|
95
95
|
} = useInteractions([click, dismiss]);
|
|
96
|
-
const targetClick = target
|
|
97
|
-
const referenceProps = getReferenceProps({
|
|
96
|
+
const targetClick = target?.props?.onClick;
|
|
97
|
+
const referenceProps = targetClick ? getReferenceProps({
|
|
98
98
|
onClick: event => {
|
|
99
99
|
if (targetClick) {
|
|
100
100
|
event.stopPropagation();
|
|
101
101
|
targetClick(event);
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
|
-
});
|
|
104
|
+
}) : getReferenceProps();
|
|
105
105
|
const targetElement = /*#__PURE__*/isValidElement(target) ? ( /*#__PURE__*/cloneElement(target, {
|
|
106
106
|
...referenceProps,
|
|
107
107
|
// @ts-ignore - we're adding a popover ref to the target element so we can position the popover relative to it
|