Fix cell styles

master
Max Ehrlicher-Schmidt 4 years ago
parent 679bbe94d5
commit 5222c65af9

@ -60,6 +60,7 @@
(validityChange)="validityChange(prop.dataPath, $event)" (validityChange)="validityChange(prop.dataPath, $event)"
[(from)]="data[prop.dataPath + '.from']" [(from)]="data[prop.dataPath + '.from']"
[(to)]="data[prop.dataPath + '.to']" [(to)]="data[prop.dataPath + '.to']"
[label]="prop.translation || prop.dataPath"
></app-date-range-cell> ></app-date-range-cell>
<a <a
mat-button mat-button

@ -62,7 +62,7 @@
</ng-template> </ng-template>
</div> </div>
<div #enumInputType *ngIf="htmlInputType === 'stringList'"> <div #enumInputType class="list" *ngIf="htmlInputType === 'stringList'">
<mat-form-field *ngIf="editable || label; else nonEditableText"> <mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label> <mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList> <mat-chip-list #chipList>
@ -89,7 +89,7 @@
</ng-template> </ng-template>
</div> </div>
<div #enumInputType *ngIf="htmlInputType === 'linkList'"> <div #enumInputType class="list" *ngIf="htmlInputType === 'linkList'">
<mat-form-field *ngIf="editable || label; else nonEditableText"> <mat-form-field *ngIf="editable || label; else nonEditableText">
<mat-label *ngIf="label">{{ label }}</mat-label> <mat-label *ngIf="label">{{ label }}</mat-label>
<mat-chip-list #chipList> <mat-chip-list #chipList>

@ -0,0 +1,5 @@
.list {
::ng-deep .mat-form-field-infix {
min-height: 1em;
}
}

@ -3,7 +3,6 @@
*ngIf="editable || label; else stringValue" *ngIf="editable || label; else stringValue"
[formGroup]="dateRangeGroup" [formGroup]="dateRangeGroup"
> >
<mat-label *ngIf="label">{{ label }}</mat-label>
<mat-form-field class="date-range-input"> <mat-form-field class="date-range-input">
<input <input
matInput matInput

@ -74,6 +74,10 @@ export class NumberRangeCellComponent implements OnInit {
minValue: new FormControl(), minValue: new FormControl(),
maxValue: new FormControl(), maxValue: new FormControl(),
}); });
if (!this.editable) {
this.rangeForm?.controls['minValue'].disable();
this.rangeForm?.controls['maxValue'].disable();
}
this.rangeForm.controls['minValue'].markAsTouched(); this.rangeForm.controls['minValue'].markAsTouched();
this.rangeForm.controls['maxValue'].markAsTouched(); this.rangeForm.controls['maxValue'].markAsTouched();
this.rangeForm?.controls['minValue'].setValue(this.min); this.rangeForm?.controls['minValue'].setValue(this.min);

Loading…
Cancel
Save