diff --git a/lib/core/form/components/form-field/form-field.component.ts b/lib/core/form/components/form-field/form-field.component.ts index fc103e3953..0b0c9eecb1 100644 --- a/lib/core/form/components/form-field/form-field.component.ts +++ b/lib/core/form/components/form-field/form-field.component.ts @@ -159,8 +159,6 @@ export class FormFieldComponent implements OnInit, OnDestroy { } focusToggle() { - setTimeout(() => { - this.focus = !this.focus; - }); + this.focus = !this.focus; } } diff --git a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts index 7d50357170..d14474fcac 100644 --- a/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts +++ b/lib/process-services-cloud/src/lib/form/components/widgets/attach-file/upload-cloud.widget.ts @@ -151,7 +151,7 @@ export class UploadCloudWidgetComponent extends WidgetComponent implements OnIni if (values && values.length > 0) { this.field.value = values; this.field.form.values[this.field.id] = values; - this.hasFile = true; + this.hasFile = this.field.form.values[this.field.id].length > 0; } else { this.field.value = []; this.field.form.values[this.field.id] = [];