Browse Source

Refactoring

pull/76/head
Thomas 4 years ago
parent
commit
4d241cbd5b
  1. 2
      apps/client/src/app/components/transactions-table/transactions-table.component.html
  2. 7
      apps/client/src/app/components/transactions-table/transactions-table.component.ts

2
apps/client/src/app/components/transactions-table/transactions-table.component.html

@ -3,9 +3,9 @@
<mat-chip-list #chipList aria-label="Search keywords">
<mat-chip
*ngFor="let searchKeyword of searchKeywords"
matChipRemove
[removable]="true"
(removed)="removeKeyword(searchKeyword)"
matChipRemove
>
{{ searchKeyword }}
<ion-icon class="ml-2" matPrefix name="close-outline"></ion-icon>

7
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();

Loading…
Cancel
Save