mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-01 11:38:03 +08:00
修复 treeSelect clear 按钮显示的问题
This commit is contained in:
parent
ff8eee9525
commit
f8bbc00faf
@ -408,7 +408,8 @@ export default class TreeSelectControl extends React.Component<TreeSelectProps,
|
||||
classPrefix: ns,
|
||||
classnames: cx,
|
||||
searchable,
|
||||
autoComplete
|
||||
autoComplete,
|
||||
selectedOptions
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@ -458,7 +459,7 @@ export default class TreeSelectControl extends React.Component<TreeSelectProps,
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{clearable && !disabled && value && value.length ? (<a onClick={this.clearValue} className={`${ns}TreeSelect-clear`}>{closeIcon}</a>) : null}
|
||||
{clearable && !disabled && selectedOptions.length ? (<a onClick={this.clearValue} className={`${ns}TreeSelect-clear`}>{closeIcon}</a>) : null}
|
||||
|
||||
{loading ? (
|
||||
<span className={cx('TreeSelect-spinner')}>
|
||||
|
Loading…
Reference in New Issue
Block a user