From 4d7475eece57dbef05e6db0d298a0da42164b004 Mon Sep 17 00:00:00 2001 From: MichaelMorris Date: Mon, 13 Mar 2023 17:04:38 +0000 Subject: [PATCH] Fix valid values constraints not showing Signed-off-by: MichaelMorris Issue-ID: SDC-4432 Change-Id: I3bc0a2c05e241912872199e7462e7afaf5b4ab53 --- .../properties-assignment/constraints/constraints.component.html | 3 ++- .../pages/properties-assignment/constraints/constraints.component.ts | 5 ++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html index 3bbdaff2cb..198bf53e9e 100644 --- a/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html +++ b/catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html @@ -88,8 +88,9 @@
-
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)); }); } -- 2.16.6