2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-07 07:12:23 +03:00

use es6 spread

This commit is contained in:
nanotronic
2016-03-24 16:01:09 +01:00
parent 22591d1542
commit 179bb5c346
+4 -4
View File
@@ -294,7 +294,7 @@
this.onChange && val !== old ? this.onChange(val) : null
},
options() {
if (!this.optionAdded) {
if (!this.isAdding) {
this.$set('value', this.multiple ? [] : null)
}
},
@@ -443,11 +443,11 @@
this.select( this.filteredOptions[ this.typeAheadPointer ] );
} else if (this.tagable && this.search.length){
let option = this.createOption(this.search)
this.optionAdded = true
this.options.unshift(option)
this.isAdding = true
this.$set('options', [option, ...this.options])
this.$nextTick(() => {
this.optionAdded = false
this.select(option)
this.isAdding = false
})
}