mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-25 11:40:04 +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,
|
[`${prefixCls}-content-item-disabled`]: item.disabled,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let title: string | undefined = undefined;
|
||||||
|
if (typeof renderedText === 'string' || typeof renderedText === 'number') {
|
||||||
|
title = String(renderedText);
|
||||||
|
}
|
||||||
|
|
||||||
const listItem = (
|
const listItem = (
|
||||||
<li
|
<li
|
||||||
className={className}
|
className={className}
|
||||||
title={renderedText}
|
title={title}
|
||||||
onClick={item.disabled ? undefined : () => onClick(item)}
|
onClick={item.disabled ? undefined : () => onClick(item)}
|
||||||
>
|
>
|
||||||
<Checkbox checked={checked} disabled={item.disabled} />
|
<Checkbox checked={checked} disabled={item.disabled} />
|
||||||
|
Loading…
Reference in New Issue
Block a user