diff --git a/apps/client/src/app/components/transactions-table/transactions-table.component.ts b/apps/client/src/app/components/transactions-table/transactions-table.component.ts index 4978701f4..0e2677d24 100644 --- a/apps/client/src/app/components/transactions-table/transactions-table.component.ts +++ b/apps/client/src/app/components/transactions-table/transactions-table.component.ts @@ -89,6 +89,17 @@ export class TransactionsTableComponent this.dataSource = new MatTableDataSource(this.transactions); this.dataSource.sort = this.sort; + this.dataSource.filterPredicate = (data, filter: string) => { + const accumulator = (currentTerm, key) => { + return key === 'Account' + ? currentTerm + data.Account.name + : currentTerm + data[key]; + }; + const dataStr = Object.keys(data).reduce(accumulator, '').toLowerCase(); + const transformedFilter = filter.trim().toLowerCase(); + return dataStr.indexOf(transformedFilter) !== -1; + }; + this.isLoading = false; } }