修复list placeholder问题 (#1897)

This commit is contained in:
RickCole 2021-04-27 21:25:03 +08:00 committed by GitHub
parent f4188afc37
commit 25295dd6e7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,8 @@ export default class ListControl extends React.Component<ListProps, any> {
itemSchema,
data,
labelField,
listClassName
listClassName,
translate: __
} = this.props;
let body: JSX.Element | null = null;
@ -153,7 +154,9 @@ export default class ListControl extends React.Component<ListProps, any> {
{body ? (
body
) : (
<span className={cx('ListControl-placeholder')}>{placeholder}</span>
<span className={cx('ListControl-placeholder')}>
{__(placeholder)}
</span>
)}
</div>
);