Fix untranslated searchable values

Fixes a bug where the search value selector was not always filtering
for translated values.
Uses getTitle() in SearchValue selector rather than toString,
to allow enhance compatibility with custom values
This commit is contained in:
Sean Engelhardt 2019-12-10 16:46:59 +01:00
parent 77bf24fe3a
commit 1e45153c0a
1 changed files with 2 additions and 7 deletions

View File

@ -152,13 +152,8 @@ export class SearchValueSelectorComponent implements OnDestroy {
if (foundId) {
return true;
}
return (
item
.toString()
.toLowerCase()
.indexOf(this.searchValue) > -1
);
const searchableString = this.translate.instant(item.getTitle()).toLowerCase();
return searchableString.indexOf(this.searchValue) > -1;
});
}
}