@nextui-org/popover
Advanced tools
Comparing version 2.2.0-beta.1 to 2.2.0-beta.2
@@ -371,2 +371,3 @@ "use client"; | ||
var PopoverTrigger = (0, import_system3.forwardRef)((props, _) => { | ||
var _a; | ||
const { triggerRef, getTriggerProps } = usePopoverContext(); | ||
@@ -379,5 +380,6 @@ const { children, ...otherProps } = props; | ||
}, [children]); | ||
const childRef = (_a = child.props.ref) != null ? _a : child.ref; | ||
const { onPress, isDisabled, ...restProps } = (0, import_react5.useMemo)(() => { | ||
return getTriggerProps((0, import_utils3.mergeProps)(otherProps, child.props), child.ref); | ||
}, [getTriggerProps, child.props, otherProps, child.ref]); | ||
return getTriggerProps((0, import_utils3.mergeProps)(otherProps, child.props), childRef); | ||
}, [getTriggerProps, child.props, otherProps, childRef]); | ||
const [, triggerChildren] = (0, import_react_utils3.pickChildren)(children, import_button.Button); | ||
@@ -384,0 +386,0 @@ const { buttonProps } = (0, import_use_aria_button.useAriaButton)({ onPress, isDisabled }, triggerRef); |
@@ -44,2 +44,3 @@ "use client"; | ||
var PopoverTrigger = (0, import_system.forwardRef)((props, _) => { | ||
var _a; | ||
const { triggerRef, getTriggerProps } = usePopoverContext(); | ||
@@ -52,5 +53,6 @@ const { children, ...otherProps } = props; | ||
}, [children]); | ||
const childRef = (_a = child.props.ref) != null ? _a : child.ref; | ||
const { onPress, isDisabled, ...restProps } = (0, import_react.useMemo)(() => { | ||
return getTriggerProps((0, import_utils.mergeProps)(otherProps, child.props), child.ref); | ||
}, [getTriggerProps, child.props, otherProps, child.ref]); | ||
return getTriggerProps((0, import_utils.mergeProps)(otherProps, child.props), childRef); | ||
}, [getTriggerProps, child.props, otherProps, childRef]); | ||
const [, triggerChildren] = (0, import_react_utils2.pickChildren)(children, import_button.Button); | ||
@@ -57,0 +59,0 @@ const { buttonProps } = (0, import_use_aria_button.useAriaButton)({ onPress, isDisabled }, triggerRef); |
{ | ||
"name": "@nextui-org/popover", | ||
"version": "2.2.0-beta.1", | ||
"version": "2.2.0-beta.2", | ||
"description": "A popover is an overlay element positioned relative to a trigger.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
112798
2972
0