Skip to content

Commit

Permalink
fix: menuItem custom icon lose custom class, close #5390
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Mar 24, 2022
1 parent e9ba9fe commit e146b48
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions components/menu/src/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,13 @@ export default defineComponent({
onFocus={onInternalFocus}
title={typeof title === 'string' ? title : undefined}
>
{cloneElement(icon, {
class: `${prefixCls.value}-item-icon`,
})}
{cloneElement(
icon,
{
class: `${prefixCls.value}-item-icon`,
},
false,
)}
{renderItemChildren(icon, children)}
</Overflow.Item>
</Tooltip>
Expand Down

0 comments on commit e146b48

Please sign in to comment.