2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-06-22 10:30:34 +03:00

Make filter options to not affect taggable vSelects

This commit is contained in:
Eleftherios Pegiadis
2017-12-06 13:50:10 +02:00
parent 602bffb90b
commit ad06e313df
+4 -3
View File
@@ -506,7 +506,8 @@
/** /**
* When true, existing options will be filtered * When true, existing options will be filtered
* by the search text. * by the search text. Should not be used in conjunction
* with taggable.
* @type {Boolean} * @type {Boolean}
*/ */
filterOptions: { filterOptions: {
@@ -897,8 +898,8 @@
* @return {array} * @return {array}
*/ */
filteredOptions() { filteredOptions() {
if (this.filterOptions === false) { if (!this.filterOptions && !this.taggable) {
return this.mutableOptions return this.mutableOptions.slice()
} }
let options = this.mutableOptions.filter((option) => { let options = this.mutableOptions.filter((option) => {
if (typeof option === 'object' && option.hasOwnProperty(this.label)) { if (typeof option === 'object' && option.hasOwnProperty(this.label)) {