From: Bastian Dehn Date: Sat, 11 Jun 2022 08:55:31 +0000 (+0200) Subject: add: save with press enter X-Git-Tag: v1.0^2~2 X-Git-Url: https://gitweb.hhaalo.de/?a=commitdiff_plain;h=cff0967b99fcd763a681bb25fcd50eaff1e381dd;p=speisekarten-editor.git add: save with press enter --- diff --git a/src/app/food/food.component.html b/src/app/food/food.component.html index eeac428..fd2e218 100644 --- a/src/app/food/food.component.html +++ b/src/app/food/food.component.html @@ -7,7 +7,10 @@ [disabled]="formFoodVisible" (click)="editFood()">Bearbeiten -
+ diff --git a/src/app/food/food.component.ts b/src/app/food/food.component.ts index 420109f..a675c9a 100644 --- a/src/app/food/food.component.ts +++ b/src/app/food/food.component.ts @@ -30,4 +30,10 @@ export class FoodComponent implements OnInit { this.formFoodVisible = false; } + + public onKeypressEnter(e: any): void + { + if (e.keyCode === 13) + this.saveFood(); + } } diff --git a/src/app/subtitle/subtitle.component.html b/src/app/subtitle/subtitle.component.html index 2866586..9a38035 100644 --- a/src/app/subtitle/subtitle.component.html +++ b/src/app/subtitle/subtitle.component.html @@ -8,9 +8,13 @@ id="buttonFood" (click)="addNewFood()">Speise hinzufügen - + - + - +