aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui
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
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')
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html3
-rw-r--r--catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.ts5
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 @@
</div>
<div class="w-sdc-form-columns-wrapper" *ngFor="let value of constraintValuesArray(constraintIndex).controls; let valueIndex = index; trackBy:trackByFn">
<div class="w-sdc-form-column">
- <input type="text" class="i-sdc-form-input" required
+ <input type="text" class="i-sdc-form-input" required
[value]="value.value"
+ [disabled]=isViewOnly
(input)="onChangeConstrainValueIndex(constraintIndex, $event.target.value, valueIndex)"/>
</div>
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));
});
}