[AAE-15522] Fix - Dropdown variable error messages are displayed at modeling level (#8730)

This commit is contained in:
Tomasz Gnyp
2023-07-04 09:37:08 +02:00
committed by GitHub
parent 3b3fd5ab9a
commit a933070fc3
9 changed files with 101 additions and 7 deletions

View File

@@ -82,6 +82,9 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
@Input()
fieldValidators: FormFieldValidator[] = [...FORM_FIELD_VALIDATORS];
@Input()
preview: boolean = false;
/** Emitted when the form is submitted with the `Save` or custom outcomes. */
@Output()
formSaved = new EventEmitter<FormModel>();
@@ -176,6 +179,10 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
this.refreshFormData();
return;
}
if (changes?.preview?.currentValue) {
this.setFormPreviewState();
}
}
/**
@@ -357,6 +364,10 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
this.onFormDataRefreshed(this.form);
}
private setFormPreviewState(): void {
this.form.preview = this.preview;
}
protected onFormLoaded(form: FormModel) {
this.formLoaded.emit(form);
}