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

This commit is contained in:
Mercy Chrysolite 2020-05-29 16:13:18 +05:30 committed by GitHub
parent 84607de277
commit 1565a49f68
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

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

View File

@ -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 = this.field.form.values[this.field.id].length > 0;
this.hasFile = true;
} else {
this.field.value = [];
this.field.form.values[this.field.id] = [];