diff --git a/.changeset/brown-poems-accept.md b/.changeset/brown-poems-accept.md new file mode 100644 index 000000000..3fd772063 --- /dev/null +++ b/.changeset/brown-poems-accept.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/hiui": patch +--- + +fix(dropdown): 修复 overlay={{className: 'xx'}} 不生效问题 diff --git a/.changeset/quick-seas-allow.md b/.changeset/quick-seas-allow.md new file mode 100644 index 000000000..1c62b47d3 --- /dev/null +++ b/.changeset/quick-seas-allow.md @@ -0,0 +1,5 @@ +--- +"@hi-ui/dropdown": patch +--- + +fix: 修复 overlay={{className: 'xx'}} 不生效问题 diff --git a/packages/ui/dropdown/src/use-dropdown.tsx b/packages/ui/dropdown/src/use-dropdown.tsx index d0849c4b1..6921878c5 100644 --- a/packages/ui/dropdown/src/use-dropdown.tsx +++ b/packages/ui/dropdown/src/use-dropdown.tsx @@ -134,6 +134,7 @@ export const useDropdown = (props: UseDropdownProps) => { overlay: { ...overlay, ...props.overlay, + className: props.overlay.className ?? overlay?.className, closeOnOutsideClick: true, visible: menuVisible, attachEl: triggerElementRef.current,