Basic tags, correspondents & document type dropdowns

This commit is contained in:
Michael Shamoon
2020-12-08 23:08:02 -08:00
parent 3d67892290
commit f9648af2c0
4 changed files with 107 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
import { Pipe, PipeTransform } from '@angular/core';
@Pipe({
name: 'filter'
})
export class FilterPipe implements PipeTransform {
transform(items: any[], searchText: string): any[] {
if (!items) return [];
if (!searchText) return items;
return items.filter(item => {
return Object.keys(item).some(key => {
return String(item[key]).toLowerCase().includes(searchText.toLowerCase());
});
});
}
}