fix(dropdown): getMenuTriggerProps mergeProps (#2450)

* fix(dropdown): getMenuTriggerProps mergeProps

* feat(changeset): fixed getMenuTriggerProps mergeProps

* refactor(dropdown): use isDisabled directly

* chore(changeset): correct issue number
This commit is contained in:
աӄա 2024-03-05 19:58:01 +08:00 committed by GitHub
parent f864dc3974
commit 0a9982d3ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -0,0 +1,5 @@
---
"@nextui-org/dropdown": patch
---
fixed getMenuTriggerProps mergeProps (#2448)

View File

@ -127,7 +127,7 @@ export function useDropdown(props: UseDropdownProps) {
const {onKeyDown, onPress, onPressStart, ...otherMenuTriggerProps} = menuTriggerProps; const {onKeyDown, onPress, onPressStart, ...otherMenuTriggerProps} = menuTriggerProps;
return { return {
...mergeProps(otherMenuTriggerProps, {isDisabled: props.isDisabled, originalProps}), ...mergeProps(otherMenuTriggerProps, {isDisabled}, originalProps),
ref: mergeRefs(_ref, triggerRef), ref: mergeRefs(_ref, triggerRef),
}; };
}; };