Skip to content

Commit 7baf464

Browse files
committed
fixes issue 255, using textarea for form value input
1 parent 5f4873c commit 7baf464

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

src/app/components/add-value-form/add-value-form.component.html

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,14 @@
99

1010
<div *ngIf="type !== 'String'" class="add-form-list">
1111
<div class="line" *ngFor="let v of getItemArray(); let i = index">
12-
<mat-form-field *ngIf="type === 'List' || type === 'Set' || type === 'Ordered Set'">
13-
<input matInput placeholder="Value"
14-
(change)="onValueChange()"
15-
[(ngModel)]="getItemArray()[i].value">
16-
</mat-form-field>
17-
18-
<mat-form-field *ngIf="type === 'Ordered Set'">
19-
<input matInput type="number" placeholder="Score"
20-
(change)="onValueChange()"
21-
[(ngModel)]="getItemArray()[i].score"
22-
type="number">
23-
</mat-form-field>
24-
2512
<mat-form-field *ngIf="type === 'Hash Map'" style="flex-grow:0">
2613
<input matInput placeholder="Key"
2714
[readonly]="isEditMode && !v.isNew"
2815
(change)="onValueChange()"
2916
[(ngModel)]="getItemArray()[i].key">
3017
</mat-form-field>
3118

32-
<mat-form-field *ngIf="type === 'Hash Map'">
19+
<mat-form-field *ngIf="type === 'List' || type === 'Set' || type === 'Ordered Set' || type === 'Hash Map'">
3320
<textarea matInput placeholder="Value"
3421
(change)="onValueChange()"
3522
[(ngModel)]="getItemArray()[i].value"
@@ -38,6 +25,13 @@
3825
cdkAutosizeMaxRows="7"></textarea>
3926
</mat-form-field>
4027

28+
<mat-form-field *ngIf="type === 'Ordered Set'">
29+
<input matInput type="number" placeholder="Score"
30+
(change)="onValueChange()"
31+
[(ngModel)]="getItemArray()[i].score"
32+
type="number">
33+
</mat-form-field>
34+
4135
<button mat-icon-button (click)="onRemoveItem(getItemArray(),i)" *ngIf="!isEditMode && getItemArray().length > 1">
4236
<i class="material-icons delete-icon">delete</i>
4337
</button>

0 commit comments

Comments
 (0)