onKeyDown bug fix (#5766)

+ close #5487
This commit is contained in:
陆离 2017-04-22 10:48:21 +08:00 committed by ddcat1115
parent 75e9e44a2f
commit b694608af4

View File

@ -52,7 +52,14 @@ export default class AutoComplete extends React.Component<AutoCompleteProps, any
const element = children && React.isValidElement(children) && children.type !== Option ?
React.Children.only(this.props.children) :
<Input/>;
return <InputElement className="ant-input">{element}</InputElement>;
return (
<InputElement
{...element.props}
className={classNames('ant-input', element.props.className)}
>
{element}
</InputElement>
);
}
render() {