mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
AAE-12240: Form save button enable/disable management (#8502)
* AAE-12240: Form save button enable/disable management * AAE-12240: Code improvement
This commit is contained in:
@@ -132,6 +132,14 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
this.form.addValuesNotPresent(valuesToSetIfNotPresent);
|
||||
this.onFormDataRefreshed(this.form);
|
||||
});
|
||||
|
||||
this.formService.formFieldValueChanged
|
||||
.pipe(takeUntil(this.onDestroy$))
|
||||
.subscribe(() => {
|
||||
if (this.disableSaveButton) {
|
||||
this.disableSaveButton = false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@HostListener('keydown', ['$event'])
|
||||
@@ -314,7 +322,7 @@ export class FormCloudComponent extends FormBaseComponent implements OnChanges,
|
||||
formValues[variable.name] = variable.value;
|
||||
});
|
||||
|
||||
const form = new FormModel(formCloudRepresentationJSON, formValues, this.readOnly);
|
||||
const form = new FormModel(formCloudRepresentationJSON, formValues, this.readOnly, this.formService);
|
||||
if (!form) {
|
||||
form.outcomes = this.getFormDefinitionOutcomes(form);
|
||||
}
|
||||
|
Reference in New Issue
Block a user