Browse Source
Merge pull request #357 from awinnen/maximum_callstacksize_exceeded
Maximum callstacksize exceeded
pull/361/head
Sebastian Stehle
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
5 deletions
-
src/Squidex/app/framework/angular/forms/control-errors.component.ts
|
|
|
@ -60,10 +60,7 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements |
|
|
|
|
|
|
|
public ngOnDestroy() { |
|
|
|
super.ngOnDestroy(); |
|
|
|
|
|
|
|
if (this.control && this.originalMarkAsTouched) { |
|
|
|
this.control['markAsTouched'] = this.originalMarkAsTouched; |
|
|
|
} |
|
|
|
this.restoreOriginalMarkAsTouchedFunction(); |
|
|
|
} |
|
|
|
|
|
|
|
public ngOnChanges() { |
|
|
|
@ -87,6 +84,7 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements |
|
|
|
|
|
|
|
if (this.control !== control) { |
|
|
|
this.unsubscribeAll(); |
|
|
|
this.restoreOriginalMarkAsTouchedFunction(); |
|
|
|
|
|
|
|
this.control = control; |
|
|
|
|
|
|
|
@ -112,6 +110,12 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements |
|
|
|
this.createMessages(); |
|
|
|
} |
|
|
|
|
|
|
|
private restoreOriginalMarkAsTouchedFunction() { |
|
|
|
if (this.control && this.originalMarkAsTouched) { |
|
|
|
this.control['markAsTouched'] = this.originalMarkAsTouched; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private createMessages() { |
|
|
|
const errors: string[] = []; |
|
|
|
|
|
|
|
@ -131,4 +135,4 @@ export class ControlErrorsComponent extends StatefulComponent<State> implements |
|
|
|
this.next(s => ({ ...s, errorMessages: errors })); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|