Skip to content

Commit

Permalink
Allow control hightlight case sensitivity
Browse files Browse the repository at this point in the history
  • Loading branch information
TatuLund authored Jun 25, 2020
1 parent 8576a18 commit bde468c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/vcf-autocomplete.html
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,11 @@
type: String,
},

caseSensitive: {
type: Boolean,
value: false
},

_limitedOptions: {
type: Array,
},
Expand Down Expand Up @@ -300,6 +305,10 @@
}

_getValueIndex(value, option) {
if (!this.caseSensitive) {
value = value.toLowerCase();
option = option.toLowerCase();
}
return option.indexOf(value) >= 0 ? option.indexOf(value) : 0;
}

Expand Down

0 comments on commit bde468c

Please sign in to comment.