fix: nestedSelect 无数据时展示问题 (#2308)

This commit is contained in:
Allen 2021-07-21 14:54:44 +08:00 committed by GitHub
parent 4caecfa03c
commit becc257aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 2 deletions

View File

@ -17,7 +17,19 @@
}
&-noResult {
width: px2rem(160px);
padding: 0 var(--gap-xs);
color: var(--Form-select-placeholderColor);
line-height: var(--Form-input-lineHeight);
font-size: var(--Form-select-input-fontSize);
user-select: none;
padding: calc(
(
var(--Form-select-menu-height) - var(--Form-input-lineHeight) *
var(--Form-input-fontSize)
) / 2
)
var(--Form-select-paddingX);
}
&-menu {

View File

@ -512,7 +512,7 @@ export default class NestedSelectControl extends React.Component<
let noResultsText: any = this.props.noResultsText;
if (noResultsText) {
noResultsText = render('noResultText', noResultsText);
noResultsText = render('noResultText', __(noResultsText));
}
let body = (
@ -525,7 +525,7 @@ export default class NestedSelectControl extends React.Component<
this.renderOptions()
) : (
<div className={cx('NestedSelect-noResult')}>
{__(noResultsText)}
{noResultsText}
</div>
)}
</div>