Visibility Rules fix
* Reduce sourceValue visibility value based on logic.
This commit is contained in:
parent
cb1d7b5340
commit
74ec2126f0
|
@ -69,12 +69,13 @@ export class VisibilityRulesService {
|
|||
} else {
|
||||
const visibilityDependencySource = visibilityRule.sourceVisibilityRules.filter(x => x.sourceControlId === sourceId);
|
||||
|
||||
visibilityDependencySource.forEach(x => {
|
||||
const shouldBeVisible = visibilityDependencySource.reduce((isVisible, x) => {
|
||||
|
||||
const shouldBeHidden = value !== null && (this.parseValue(value) !== this.parseValue(x.sourceControlValue));
|
||||
return this.VISIBILITY_RULE_LOGIC === 'OR'? (isVisible || !shouldBeHidden) : (isVisible && !shouldBeHidden);
|
||||
// if(value !== null && )
|
||||
visibilityMap.set(sourceId, !shouldBeHidden);
|
||||
});
|
||||
}, this.VISIBILITY_RULE_LOGIC === 'AND');
|
||||
visibilityMap.set(sourceId, shouldBeVisible);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue