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:
@@ -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
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user