Revert "[ACA-3286] User gets error when removing the attached file (#5735)" (#5738)

This reverts commit 1565a49f68.
This commit is contained in:
Eugenio Romano
2020-05-29 11:58:49 +01:00
committed by GitHub
parent 1565a49f68
commit 084dacde26
2 changed files with 2 additions and 4 deletions

View File

@@ -159,8 +159,6 @@ export class FormFieldComponent implements OnInit, OnDestroy {
} }
focusToggle() { focusToggle() {
setTimeout(() => { this.focus = !this.focus;
this.focus = !this.focus;
});
} }
} }

View File

@@ -151,7 +151,7 @@ export class UploadCloudWidgetComponent extends WidgetComponent implements OnIni
if (values && values.length > 0) { if (values && values.length > 0) {
this.field.value = values; this.field.value = values;
this.field.form.values[this.field.id] = values; this.field.form.values[this.field.id] = values;
this.hasFile = true; this.hasFile = this.field.form.values[this.field.id].length > 0;
} else { } else {
this.field.value = []; this.field.value = [];
this.field.form.values[this.field.id] = []; this.field.form.values[this.field.id] = [];