From 81ac40ef31ef99328e7634e198d7d23e31f200e1 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Wed, 24 Mar 2021 11:04:09 +0100 Subject: [PATCH] Refactored handling of form values inside participants component --- .../pages/participants/participants.component.html | 2 +- .../app/pages/participants/participants.component.ts | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/dafa-web/src/app/pages/participants/participants.component.html b/apps/dafa-web/src/app/pages/participants/participants.component.html index 7a3956e..6ade5a7 100644 --- a/apps/dafa-web/src/app/pages/participants/participants.component.html +++ b/apps/dafa-web/src/app/pages/participants/participants.component.html @@ -7,7 +7,7 @@ leo quis ante porttitor tincidunt. Nam tincidunt imperdiet tortor eu suscipit. Maecenas ut dui est.

-
+ (''); - handleSearchSubmit($event: SubmitEvent): void { + get searchValue(): string { + return this._searchValue$.getValue(); + } + + handleSearchSubmit(): void { console.log(this.searchValue); - console.log($event); } handleSearchInput($event: CustomEvent): void { - this.searchValue = $event.detail.target.value; + this._searchValue$.next($event.detail.target.value); } }