fix: Dropdown should not display when items is empty array (#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>
This commit is contained in:
afc163 2024-02-07 20:22:31 +08:00 committed by GitHub
parent 8a76266dd0
commit 3d1c81db92
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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,