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

View File

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