mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4774] - fix visibility condition between checkbox fields (#4964)
* [ADF-4774] - fix visibility condition between checkbox fields * [ADF-4774] - PR changes
This commit is contained in:
committed by
Eugenio Romano
parent
8a96ed2fbe
commit
78e60a4da4
@@ -93,7 +93,9 @@ export class WidgetVisibilityService {
|
||||
leftValue = this.getVariableValue(form, visibilityObj.leftValue, this.processVarList);
|
||||
} else if (visibilityObj.leftType && visibilityObj.leftType === WidgetTypeEnum.field) {
|
||||
leftValue = this.getFormValue(form, visibilityObj.leftValue);
|
||||
leftValue = leftValue ? leftValue : this.getVariableValue(form, visibilityObj.leftValue, this.processVarList);
|
||||
if (this.isInvalidValue(leftValue)) {
|
||||
leftValue = this.getVariableValue(form, visibilityObj.leftValue, this.processVarList);
|
||||
}
|
||||
}
|
||||
return leftValue;
|
||||
}
|
||||
@@ -138,6 +140,10 @@ export class WidgetVisibilityService {
|
||||
return valueFound;
|
||||
}
|
||||
|
||||
private isInvalidValue(value: any): boolean {
|
||||
return value === undefined || value === '';
|
||||
}
|
||||
|
||||
searchValueInForm(form: FormModel, fieldId: string): string {
|
||||
let fieldValue = '';
|
||||
form.getFormFields().forEach((formField: FormFieldModel) => {
|
||||
|
Reference in New Issue
Block a user