diff options
Diffstat (limited to 'catalog-ui')
-rw-r--r-- | catalog-ui/src/app/ng2/pages/properties-assignment/constraints/constraints.component.html | 3 | ||||
-rw-r--r-- | catalog-ui/src/app/ng2/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 @@ </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)); }); } |