From 1fe9970ff9de3b399a2384722288f17a879ebba0 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Fri, 5 May 2023 16:56:17 +0200 Subject: [PATCH] [PM-2135] chore: add hack comment --- .../src/auth/components/user-verification.component.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/angular/src/auth/components/user-verification.component.ts b/libs/angular/src/auth/components/user-verification.component.ts index 71e5bd34ff..98e39326e6 100644 --- a/libs/angular/src/auth/components/user-verification.component.ts +++ b/libs/angular/src/auth/components/user-verification.component.ts @@ -28,6 +28,11 @@ export class UserVerificationComponent implements ControlValueAccessor, OnInit, set invalidSecret(value: boolean) { this._invalidSecret = value; this.invalidSecretChange.emit(value); + + // ISSUE: This is pretty hacky but unfortunately there is no way of knowing if the parent + // control has been marked as touched, see: https://github.com/angular/angular/issues/10887 + // When that functionality has been added we should also look into forwarding reactive form + // controls errors so that we don't need a separate input/output `invalidSecret`. if (value) { this.secret.markAsTouched(); }