From d3d2b4af532e2c52bcdfe8b41dff1b36fea7c97d Mon Sep 17 00:00:00 2001 From: Valentin Zickner Date: Sat, 8 May 2021 19:18:56 +0200 Subject: [PATCH] fix table for transaction for accounts without platform --- .../transactions-table/transactions-table.component.html | 1 + .../transactions-table/transactions-table.component.ts | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/apps/client/src/app/components/transactions-table/transactions-table.component.html b/apps/client/src/app/components/transactions-table/transactions-table.component.html index 4af802911..d4dddbe20 100644 --- a/apps/client/src/app/components/transactions-table/transactions-table.component.html +++ b/apps/client/src/app/components/transactions-table/transactions-table.component.html @@ -12,6 +12,7 @@ filter.toLowerCase().indexOf(filterValue) === 0 ) ); + } else { + this.filteredTransactions$.next(this.allFilteredTransactions); } }); } @@ -249,7 +251,9 @@ export class TransactionsTableComponent this.getFilterableValues(transaction, fieldValues); } - return [...fieldValues].sort(); + return [...fieldValues] + .filter(item => item != undefined) + .sort(); } private static getFilterableValues( @@ -261,6 +265,7 @@ export class TransactionsTableComponent fieldValues.add(transaction.type); fieldValues.add(transaction.Account?.name); fieldValues.add(transaction.Account?.Platform?.name); - return [...fieldValues]; + return [...fieldValues] + .filter(item => item != undefined); } }