mirror of
https://github.com/tenrok/vue-select.git
synced 2026-06-22 10:30:34 +03:00
use es6 spread
This commit is contained in:
@@ -294,7 +294,7 @@
|
|||||||
this.onChange && val !== old ? this.onChange(val) : null
|
this.onChange && val !== old ? this.onChange(val) : null
|
||||||
},
|
},
|
||||||
options() {
|
options() {
|
||||||
if (!this.optionAdded) {
|
if (!this.isAdding) {
|
||||||
this.$set('value', this.multiple ? [] : null)
|
this.$set('value', this.multiple ? [] : null)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -443,11 +443,11 @@
|
|||||||
this.select( this.filteredOptions[ this.typeAheadPointer ] );
|
this.select( this.filteredOptions[ this.typeAheadPointer ] );
|
||||||
} else if (this.tagable && this.search.length){
|
} else if (this.tagable && this.search.length){
|
||||||
let option = this.createOption(this.search)
|
let option = this.createOption(this.search)
|
||||||
this.optionAdded = true
|
this.isAdding = true
|
||||||
this.options.unshift(option)
|
this.$set('options', [option, ...this.options])
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.optionAdded = false
|
|
||||||
this.select(option)
|
this.select(option)
|
||||||
|
this.isAdding = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user