Merge pull request #3989 from 2betop/chore-nav

chore: nav 当 label 是自定义渲染器时不要显示 title
This commit is contained in:
RUNZE LU 2022-04-07 12:49:27 +08:00 committed by GitHub
commit 100a076425
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,7 +466,7 @@ export class Navigation extends React.Component<
<a
data-id={link.__id}
data-depth={depth}
title={link?.label?.toString()}
title={typeof link?.label === 'string' ? link?.label : undefined}
onClick={this.handleClick.bind(this, link)}
style={{
paddingLeft: depth * (parseInt(indentSize as any, 10) ?? 24)