Fix enter handling on category form

This commit is contained in:
William Brawner 2023-06-05 17:06:16 +00:00
parent 3957651211
commit 23e0df804e

View file

@ -2,13 +2,13 @@
<p>Select a category from the list to view details about it or edit it.</p> <p>Select a category from the list to view details about it or edit it.</p>
</div> </div>
<div *ngIf="currentCategory" class="form category-form"> <div *ngIf="currentCategory" class="form category-form">
<mat-form-field (keyup.enter)="doAction()"> <mat-form-field (keyup.enter)="save()">
<input matInput [(ngModel)]="currentCategory.title" placeholder="Name" required autocapitalize="words"> <input matInput [(ngModel)]="currentCategory.title" placeholder="Name" required autocapitalize="words">
</mat-form-field> </mat-form-field>
<mat-form-field (keyup.enter)="doAction()"> <mat-form-field (keyup.enter)="save()">
<textarea matInput [(ngModel)]="currentCategory.description" placeholder="Description" autocapitalize="sentences"></textarea> <textarea matInput [(ngModel)]="currentCategory.description" placeholder="Description" autocapitalize="sentences"></textarea>
</mat-form-field> </mat-form-field>
<mat-form-field (keyup.enter)="doAction()"> <mat-form-field (keyup.enter)="save()">
<input matInput type="input" [(ngModel)]="currentCategory.amount" placeholder="Amount" required step="0.01"> <input matInput type="input" [(ngModel)]="currentCategory.amount" placeholder="Amount" required step="0.01">
</mat-form-field> </mat-form-field>
<mat-radio-group [(ngModel)]="currentCategory.expense"> <mat-radio-group [(ngModel)]="currentCategory.expense">