[terms] link flags to terms - now also using keys

This commit is contained in:
Avris 2021-08-08 19:29:31 +02:00
parent 2bf1fc1837
commit 52c8bac795
2 changed files with 7 additions and 0 deletions

View File

@ -34,6 +34,9 @@
}
for (let term of this.terms || []) {
if (term.key.toLowerCase().includes(this.alt.toLowerCase())) {
return term.key;
}
if (term.term.toLowerCase().includes(this.name.toLowerCase())) {
return this.name;
}

View File

@ -745,6 +745,10 @@ export class TermsEntry {
return this.categories.includes(filter.substring(1));
}
if (this.key && this.key.toLowerCase().indexOf(filter.toLowerCase()) > -1) {
return true;
}
for (let field of ['term', 'original']) {
for (let value of this[field]) {
if (value.toLowerCase().indexOf(filter.toLowerCase()) > -1) {