Skip to content

Commit 7148e39

Browse files
committed
Autocomplete: hide options after clearing the value
1 parent b739f20 commit 7148e39

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/autocomplete/src/autocomplete.vue

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<el-input
1111
ref="input"
1212
v-bind="[$props, $attrs]"
13+
@clear="handleClear"
1314
@input="handleChange"
1415
@focus="handleFocus"
1516
@blur="handleBlur"
@@ -192,6 +193,10 @@
192193
handleBlur(event) {
193194
this.$emit('blur', event);
194195
},
196+
handleClear() {
197+
this.activated = false;
198+
this.$emit('clear');
199+
},
195200
close(e) {
196201
this.activated = false;
197202
},

0 commit comments

Comments
 (0)