Browse Source

Clean up code

pull/85/head
Thomas 4 years ago
parent
commit
e06b16bc10
  1. 7
      apps/client/src/app/components/transactions-table/transactions-table.component.ts

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

Loading…
Cancel
Save