diff --git a/components/auto-complete/demo/uncertain-category.md b/components/auto-complete/demo/uncertain-category.md
index 8c10586676..093f5b9132 100644
--- a/components/auto-complete/demo/uncertain-category.md
+++ b/components/auto-complete/demo/uncertain-category.md
@@ -47,7 +47,7 @@ function renderOption(item) {
{item.category}
区块中
- 约 {item.count} 个结果
+ 约 {item.count} 个结果
);
}
@@ -128,11 +128,17 @@ ReactDOM.render(, mountNode);
}
.global-search.ant-select-auto-complete .ant-input-preSuffix-wrapper .ant-input-suffix {
- right: 0;
+ right: 1px;
}
.global-search.ant-select-auto-complete .ant-input-preSuffix-wrapper .ant-input-suffix button {
+ border-radius: 3px;
border-top-left-radius: 0;
border-bottom-left-radius: 0;
}
+
+.global-search-item-count {
+ position: absolute;
+ right: 16px;
+}
````
diff --git a/components/auto-complete/index.en-US.md b/components/auto-complete/index.en-US.md
index 98fa52187f..76223e7714 100644
--- a/components/auto-complete/index.en-US.md
+++ b/components/auto-complete/index.en-US.md
@@ -1,7 +1,7 @@
---
category: Components
type: Data Entry
-cols: 1
+cols: 2
title: AutoComplete
---
diff --git a/components/auto-complete/index.tsx b/components/auto-complete/index.tsx
index 0be5f83c07..15768ef8ba 100755
--- a/components/auto-complete/index.tsx
+++ b/components/auto-complete/index.tsx
@@ -39,17 +39,18 @@ export interface AutoCompleteProps extends AbstractSelectProps {
}
class InputElement extends React.Component {
- private ele: Element;
+ private ele: HTMLInputElement;
+
focus = () => {
- (findDOMNode(this.ele) as HTMLInputElement).focus();
+ this.ele.focus ? this.ele.focus() : (findDOMNode(this.ele) as HTMLInputElement).focus();
}
blur = () => {
- (findDOMNode(this.ele) as HTMLInputElement).blur();
+ this.ele.blur ? this.ele.blur() : (findDOMNode(this.ele) as HTMLInputElement).blur();
}
render() {
return React.cloneElement(this.props.children, {
...this.props,
- ref: ele => this.ele = ele,
+ ref: ele => this.ele = (ele as HTMLInputElement),
}, null);
}
}