[PM-2135] chore: add hack comment

This commit is contained in:
Andreas Coroiu 2023-05-05 16:56:17 +02:00
parent e96d4a9a6a
commit 1fe9970ff9
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
1 changed files with 5 additions and 0 deletions

View File

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