aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
diff options
context:
space:
mode:
authorMichaelMorris <michael.morris@est.tech>2023-03-13 17:04:38 +0000
committerVasyl Razinkov <vasyl.razinkov@est.tech>2023-03-14 13:31:03 +0000
commit4d7475eece57dbef05e6db0d298a0da42164b004 (patch)
treed999553db83b2f330c7bb84d954e8d418120360f /catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
parent955953b295b31b33e6b8af5a767d9ef18964a65c (diff)
Fix valid values constraints not showing
Signed-off-by: MichaelMorris <michael.morris@est.tech> Issue-ID: SDC-4432 Change-Id: I3bc0a2c05e241912872199e7462e7afaf5b4ab53
Diffstat (limited to 'catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
index 31dbeadd4e..f0c1d938a9 100644
--- a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
+++ b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts
@@ -350,14 +350,13 @@ export class ConstraintsComponent implements OnInit {
});
const valRef = newForm.get('value') as FormArray;
-
if (constraint.hasOwnProperty(ConstraintTypes.valid_values)) {
constraint.validValues.forEach((val) => {
- valRef.push(new FormControl(val, this.constraintValidators));
+ valRef.push(new FormControl({value: val, disabled: this.isViewOnly}, this.constraintValidators));
});
} else {
constraint.inRange.forEach((val) => {
- valRef.push(new FormControl(val, this.constraintValidators));
+ valRef.push(new FormControl({value: val, disabled: this.isViewOnly}, this.constraintValidators));
});
}