Merge pull request #7431 from steedos/feat-nav-filter

nav组件下的option下的label属性支持表达式 #7430
This commit is contained in:
hsm-lv 2023-07-10 12:35:53 +08:00 committed by GitHub
commit 86a20c0624
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -591,7 +591,7 @@ export class Navigation extends React.Component<
const label =
typeof link.label === 'string'
? link.label
? filter(link.label, data)
: React.isValidElement(link.label)
? React.cloneElement(link.label)
: render('inline', link.label as SchemaCollection);