Skip to content

Commit

Permalink
fix: Dropdown should not display when items is empty array (ant-desig…
Browse files Browse the repository at this point in the history
…n#47375)

* fix: Dropdown should not display when items is empty array

* Apply suggestions from code review

Signed-off-by: afc163 <afc163@gmail.com>

---------

Signed-off-by: afc163 <afc163@gmail.com>
  • Loading branch information
afc163 authored and tanzhenyun committed Mar 29, 2024
1 parent 4130cda commit aa07a83
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/dropdown/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,11 @@ const genBaseStyle: GenerateStyle<DropdownToken> = (token) => {
boxShadow: token.boxShadowSecondary,
...genFocusStyle(token),

'&:empty': {
padding: 0,
boxShadow: 'none',
},

[`${menuCls}-item-group-title`]: {
padding: `${unit(paddingBlock!)} ${unit(controlPaddingHorizontal)}`,
color: token.colorTextDescription,
Expand Down

0 comments on commit aa07a83

Please sign in to comment.