From b2784829f14d29b20c85dd5a0b1d9b8440469a25 Mon Sep 17 00:00:00 2001 From: Thomas <4159106+dtslvr@users.noreply.github.com> Date: Sun, 9 May 2021 22:12:16 +0200 Subject: [PATCH] Refactoring --- .../transactions-table/transactions-table.component.html | 2 +- .../transactions-table/transactions-table.component.ts | 7 ++----- 2 files changed, 3 insertions(+), 6 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 b7d51f79c..ec721b255 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 @@ -3,9 +3,9 @@ {{ searchKeyword }} 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 9f420b048..41e65f261 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 @@ -61,8 +61,8 @@ export class TransactionsTableComponent > = this.filteredTransactions$.asObservable(); public isLoading = true; public routeQueryParams: Subscription; - public searchKeywords: string[] = []; public searchControl = new FormControl(); + public searchKeywords: string[] = []; public separatorKeysCodes: number[] = [ENTER, COMMA]; private allFilteredTransactions: string[]; @@ -98,10 +98,7 @@ export class TransactionsTableComponent }); } - public addKeyword(event: MatChipInputEvent): void { - const input = event.input; - const value = event.value; - + public addKeyword({ input, value }: MatChipInputEvent): void { if (value?.trim()) { this.searchKeywords.push(value.trim()); this.updateFilter();