mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix: 去掉 select 中的无用代码
This commit is contained in:
parent
f4df1654ca
commit
61cb1aecb0
@ -729,13 +729,6 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||
onDelete && onDelete(item);
|
||||
}
|
||||
|
||||
@autobind
|
||||
menuItemRef(ref: any) {
|
||||
if (ref && typeof ref.offsetHeight === 'number' && ref > 0) {
|
||||
this.setState({itemHeight: ref.offsetHeight});
|
||||
}
|
||||
}
|
||||
|
||||
renderValue({inputValue, isOpen}: ControllerStateAndHelpers<any>) {
|
||||
const {
|
||||
classnames: cx,
|
||||
@ -1167,14 +1160,6 @@ export class Select extends React.Component<SelectProps, SelectState> {
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
<div ref={this.menuItemRef} className={cx('Select-option hidden')}>
|
||||
{multiple ? (
|
||||
<Checkbox size="sm">Placeholder</Checkbox>
|
||||
) : (
|
||||
<span>Placeholder</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{creatable && !disabled ? (
|
||||
<a className={cx('Select-addBtn')} onClick={this.handleAddClick}>
|
||||
<Icon icon="plus" className="icon" />
|
||||
|
Loading…
Reference in New Issue
Block a user