add on-clear event

This commit is contained in:
Sergio Crisostomo 2018-05-08 12:47:03 +02:00
parent d4f39edc35
commit 7dbde804d8
3 changed files with 19 additions and 9 deletions

View file

@ -42,6 +42,7 @@
@on-query-change="onQueryChange"
@on-input-focus="isFocused = true"
@on-input-blur="isFocused = false"
@on-clear="clearSingleSelect"
/>
</slot>
</div>
@ -382,6 +383,7 @@
}
},
clearSingleSelect(){ // PUBLIC API
this.$emit('on-clear');
if (this.clearable) this.values = [];
},
getOptionData(value){