Skip to content

Commit 620cf17

Browse files
e1emeb0tsam019
authored andcommitted
Fix AutoComplete
1 parent 889f6e3 commit 620cf17

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-react",
3-
"version": "1.2.2",
3+
"version": "1.2.3",
44
"description": "Element UI for React",
55
"private": false,
66
"main": "dist/npm/es5/index.js",

src/auto-complete/AutoComplete.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ type Props = {
2525
triggerOnFocus: boolean,
2626
fetchSuggestions: Function,
2727
onSelect: Function,
28+
onChange: Function,
2829
onIconClick: Function,
2930
icon: Element | string,
3031
append: Element,
@@ -95,6 +96,10 @@ class AutoComplete extends Component {
9596
this.setState({ suggestions: [] }); return;
9697
}
9798

99+
if (this.props.onChange) {
100+
this.props.onChange(value);
101+
}
102+
98103
this.getData(value);
99104
}
100105

0 commit comments

Comments
 (0)