diff options
Diffstat (limited to 'client/src/app/shared/forms/form-reactive.ts')
-rw-r--r-- | client/src/app/shared/forms/form-reactive.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/src/app/shared/forms/form-reactive.ts b/client/src/app/shared/forms/form-reactive.ts index 441ec8203..e4f7481b5 100644 --- a/client/src/app/shared/forms/form-reactive.ts +++ b/client/src/app/shared/forms/form-reactive.ts | |||
@@ -10,6 +10,7 @@ export type FormReactiveValidationMessages = { | |||
10 | 10 | ||
11 | export abstract class FormReactive { | 11 | export abstract class FormReactive { |
12 | protected abstract formValidatorService: FormValidatorService | 12 | protected abstract formValidatorService: FormValidatorService |
13 | protected formChanged = false | ||
13 | 14 | ||
14 | form: FormGroup | 15 | form: FormGroup |
15 | formErrors: FormReactiveErrors | 16 | formErrors: FormReactiveErrors |
@@ -31,6 +32,8 @@ export abstract class FormReactive { | |||
31 | this.formErrors[ field ] = '' | 32 | this.formErrors[ field ] = '' |
32 | const control = this.form.get(field) | 33 | const control = this.form.get(field) |
33 | 34 | ||
35 | if (control.dirty) this.formChanged = true | ||
36 | |||
34 | // Don't care if dirty on force check | 37 | // Don't care if dirty on force check |
35 | const isDirty = control.dirty || forceCheck === true | 38 | const isDirty = control.dirty || forceCheck === true |
36 | if (control && isDirty && !control.valid) { | 39 | if (control && isDirty && !control.valid) { |