From e06b16bc10b8a9d2e8290b04204c7ca1f4172728 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Fri, 14 May 2021 20:31:00 +0200 Subject: [PATCH] Clean up code --- .../transactions-table/transactions-table.component.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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 3f12c522e..cf145d9cf 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 @@ -234,15 +234,16 @@ export class TransactionsTableComponent const lowercaseSearchKeywords = this.searchKeywords.map((keyword) => keyword.trim().toLowerCase() ); + + this.placeholder = + lowercaseSearchKeywords.length <= 0 ? SEARCH_PLACEHOLDER : ''; + this.allFilteredTransactions = this.getSearchableFieldValues( this.transactions ).filter((item) => { return !lowercaseSearchKeywords.includes(item.trim().toLowerCase()); }); - this.placeholder = - lowercaseSearchKeywords.length <= 0 ? SEARCH_PLACEHOLDER : ''; - this.filteredTransactions$.next(this.allFilteredTransactions); }