diff --git a/projects/common/element-components/slider.component.ts b/projects/common/element-components/slider.component.ts index 71f477c2553ce006a8e7962ed68a9f83097e9700..cd7e17b80e50f860cb653eef962a410c422dae64 100644 --- a/projects/common/element-components/slider.component.ts +++ b/projects/common/element-components/slider.component.ts @@ -76,6 +76,8 @@ export class SliderComponent extends FormElementComponent implements OnInit { ngOnInit(): void { super.ngOnInit(); - this.inputElement.disabled = this.elementModel.readOnly; + if (this.inputElement) { + this.inputElement.disabled = this.elementModel.readOnly; + } } } diff --git a/projects/editor/src/app/unit-view/page-view/properties-panel/element-properties.component.html b/projects/editor/src/app/unit-view/page-view/properties-panel/element-properties.component.html index a08d23706cd6769f18b488b9e6d634e724a8fc6a..cddf8069863d3129e2dd527a560bdcdeb0ab5436 100644 --- a/projects/editor/src/app/unit-view/page-view/properties-panel/element-properties.component.html +++ b/projects/editor/src/app/unit-view/page-view/properties-panel/element-properties.component.html @@ -181,7 +181,14 @@ </mat-button-toggle-group> </ng-container> - <mat-form-field *ngIf="combinedProperties.value !== undefined && + <mat-form-field *ngIf="combinedProperties.minValue !== undefined" appearance="fill"> + <mat-label>{{'propertiesPanel.preset' | translate }}</mat-label> + <input matInput type="number" #value="ngModel" + [ngModel]="combinedProperties.value" + (ngModelChange)="updateModel('value', $event, value.valid)"> + </mat-form-field> + + <mat-form-field *ngIf="combinedProperties.value !== undefined && combinedProperties.minValue === undefined && !combinedProperties.options && !combinedProperties.columns && combinedProperties.value !== true && combinedProperties.value !== false" appearance="fill">