mirror of
https://gitee.com/baidu/amis.git
synced 2024-11-30 11:07:52 +08:00
select noResultText 支持 Html 标签
This commit is contained in:
parent
ca0344567b
commit
f4fcecf6b6
@ -168,7 +168,7 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
let {
|
||||
autoComplete,
|
||||
searchable,
|
||||
options,
|
||||
@ -184,9 +184,15 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
||||
classnames,
|
||||
creatable,
|
||||
inline,
|
||||
noResultsText,
|
||||
render,
|
||||
...rest
|
||||
} = this.props;
|
||||
|
||||
if (noResultsText && /<\w+/.test(noResultsText)) {
|
||||
noResultsText = render('noResultText', noResultsText);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={cx(`${classPrefix}SelectControl`, className)}>
|
||||
<Select
|
||||
@ -202,8 +208,7 @@ export default class SelectControl extends React.Component<SelectProps, any> {
|
||||
searchable={autoComplete || creatable ? true : searchable}
|
||||
onChange={this.changeValue}
|
||||
loading={loading}
|
||||
cache={false}
|
||||
joinValues={false}
|
||||
noResultsText={noResultsText}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user