mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-01 03:29:39 +08:00
fix #12399. Hide title if is not string
This commit is contained in:
parent
1c85bb3b62
commit
463d3c72f9
@ -16,10 +16,15 @@ export default class Item extends React.Component<any, any> {
|
||||
[`${prefixCls}-content-item-disabled`]: item.disabled,
|
||||
});
|
||||
|
||||
let title: string | undefined = undefined;
|
||||
if (typeof renderedText === 'string' || typeof renderedText === 'number') {
|
||||
title = String(renderedText);
|
||||
}
|
||||
|
||||
const listItem = (
|
||||
<li
|
||||
className={className}
|
||||
title={renderedText}
|
||||
title={title}
|
||||
onClick={item.disabled ? undefined : () => onClick(item)}
|
||||
>
|
||||
<Checkbox checked={checked} disabled={item.disabled} />
|
||||
|
Loading…
Reference in New Issue
Block a user