mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
[AAE-3273] Manage empty option in retrieve content metadata dropdowns (#6024)
* AAE-3273 Manage empty option in retrieve content metadata dropdowns * AAE-3273 Add unit tests * AAE-3273 Refactor add not present fields * AAE-3273 Add unit test in core
This commit is contained in:
committed by
GitHub
parent
a7af27cfad
commit
c1435c53e0
@@ -116,15 +116,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.formService.updateFormValuesRequested
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe((valuesToSetIfNotPresent) => {
|
||||
const keys = Object.keys(valuesToSetIfNotPresent);
|
||||
keys.forEach(key => {
|
||||
if (!this.form.values[key]) {
|
||||
this.form.values[key] = valuesToSetIfNotPresent[key];
|
||||
}
|
||||
});
|
||||
this.data = [];
|
||||
const fields = Object.keys(this.form.values);
|
||||
fields.forEach(field => this.data.push({ name: field, value: this.form.values[field] }));
|
||||
this.data = this.form.addValuesNotPresent(valuesToSetIfNotPresent);
|
||||
this.refreshFormData();
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user