Skip to content

Commit

Permalink
feat(material/form-builder): always show input in choices origin editor
Browse files Browse the repository at this point in the history
  • Loading branch information
trik committed Jan 16, 2020
1 parent 3d068b5 commit 9b50c84
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions src/material/form-builder/choices-origin-editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,13 @@
<ng-container matColumnDef="label">
<mat-header-cell *matHeaderCellDef translate>Label</mat-header-cell>
<mat-cell *matCellDef="let row; let idx = index">
<span [title]="'Double click to edit' | translate"
(dblclick)="editing[idx + '-label'] = true"
*ngIf="!editing[idx + '-label']">
<span *ngIf="row.label">{{ row.label }}</span>
<span *ngIf="!row.label" translate>(no label)</span>
</span>
<input autofocus
#in1
(blur)="updateValue($event, 'label', in1.value, idx)"
*ngIf="editing[idx + '-label']"
type="text"
[value]="row.label">
<input matInput [(ngModel)]="row.label" type="text">
</mat-cell>
</ng-container>
<ng-container matColumnDef="value">
<mat-header-cell *matHeaderCellDef translate>Value</mat-header-cell>
<mat-cell *matCellDef="let row; let idx = index">
<span [title]="'Double click to edit' | translate"
(dblclick)="editing[idx + '-value'] = true"
*ngIf="!editing[idx + '-value']">
<span *ngIf="row.value">{{ row.value }}</span>
<span *ngIf="!row.value" translate>(no value)</span>
</span>
<input autofocus
#in2
(blur)="updateValue($event, 'value', in2.value, idx)"
*ngIf="editing[idx + '-value']"
type="text"
[value]="row.value">
<input matInput [(ngModel)]="row.value" type="text">
</mat-cell>
</ng-container>
<ng-container matColumnDef="delete">
Expand Down

0 comments on commit 9b50c84

Please sign in to comment.