fix: auto-complete custom input
parent
bbc25ad258
commit
38ab3d5307
|
@ -73,10 +73,13 @@ const AutoComplete = {
|
|||
this.select = node;
|
||||
},
|
||||
getInputElement() {
|
||||
const { placeholder } = this;
|
||||
const children = getSlot(this);
|
||||
const element = children.length ? children[0] : <Input lazy={false} />;
|
||||
return <InputElement placeholder={placeholder}>{element}</InputElement>;
|
||||
return (
|
||||
<InputElement placeholder={this.placeholder} {...element.props}>
|
||||
{element}
|
||||
</InputElement>
|
||||
);
|
||||
},
|
||||
|
||||
focus() {
|
||||
|
|
|
@ -775,7 +775,7 @@ const Select = {
|
|||
);
|
||||
|
||||
const inputElement = props.getInputElement ? props.getInputElement() : defaultInput;
|
||||
const inputCls = classnames(inputElement.class, {
|
||||
const inputCls = classnames(inputElement.props && inputElement.props.class, {
|
||||
[`${props.prefixCls}-search__field`]: true,
|
||||
});
|
||||
const inputEvents = getEvents(inputElement);
|
||||
|
|
Loading…
Reference in New Issue