Skip to content

Commit

Permalink
fix(dropdown): 修复overlay={{className: 'xx'}} 不生效问题 (#2934)
Browse files Browse the repository at this point in the history
* fix(dropdown): 修复overlay={{className: 'xx'}} 不生效问题(#2932)

* chore(dropdown): 生成变更记录文件

* chore(dropdown): 删除无用console

* chore(dropdown): 调整格式

---------

Co-authored-by: xiamiao <[email protected]>
  • Loading branch information
xiamiao1121 and xiamiao authored Jul 24, 2024
1 parent f496866 commit cafc0a5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/brown-poems-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/hiui": patch
---

fix(dropdown): 修复 overlay={{className: 'xx'}} 不生效问题
5 changes: 5 additions & 0 deletions .changeset/quick-seas-allow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@hi-ui/dropdown": patch
---

fix: 修复 overlay={{className: 'xx'}} 不生效问题
1 change: 1 addition & 0 deletions packages/ui/dropdown/src/use-dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit cafc0a5

Please sign in to comment.