Skip to content

Commit

Permalink
fix(fromt): add submitting by Enter
Browse files Browse the repository at this point in the history
  • Loading branch information
rednez committed Jan 21, 2023
1 parent 5989981 commit 936da85
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,15 @@ <h1>{{ 'Create category' | translate }}</h1>
}}</span>
</div>

<mat-form-field class="w-full">
<mat-label>{{ 'Category name' | translate }}</mat-label>
<input matInput [formControl]="category" />
<mat-error *ngIf="category.errors">{{ errorText | translate }}</mat-error>
</mat-form-field>
<form (ngSubmit)="onClickCreate()">
<mat-form-field class="w-full">
<mat-label>{{ 'Category name' | translate }}</mat-label>
<input matInput [formControl]="category" />
<mat-error *ngIf="category.errors">
{{ errorText | translate }}
</mat-error>
</mat-form-field>
</form>
</mat-card-content>

<mat-card-actions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ import { uniqNameValidator } from '../validators';
</mat-card-title>
</mat-card-header>
<mat-card-content class="mb-4">
<mat-form-field>
<mat-label>{{ 'Currency name' | translate }}</mat-label>
<input matInput [formControl]="currency" />
<mat-error *ngIf="currency.errors">{{
errorText | translate
}}</mat-error>
</mat-form-field>
<form (ngSubmit)="onClickCreate()">
<mat-form-field>
<mat-label>{{ 'Currency name' | translate }}</mat-label>
<input matInput [formControl]="currency" />
<mat-error *ngIf="currency.errors">{{
errorText | translate
}}</mat-error>
</mat-form-field>
</form>
</mat-card-content>
<mat-card-actions
class="space-x-2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,15 @@ import { uniqNameValidator } from '../validators';
</mat-card-title>
</mat-card-header>
<mat-card-content class="mb-4">
<mat-form-field>
<mat-label>{{ 'Group name' | translate }}</mat-label>
<input matInput [formControl]="group" />
<mat-error *ngIf="group.errors">{{ errorText | translate }}</mat-error>
</mat-form-field>
<form (ngSubmit)="onClickCreate()">
<mat-form-field>
<mat-label>{{ 'Group name' | translate }}</mat-label>
<input matInput [formControl]="group" />
<mat-error *ngIf="group.errors">{{
errorText | translate
}}</mat-error>
</mat-form-field>
</form>
</mat-card-content>
<mat-card-actions
class="space-x-2"
Expand Down

0 comments on commit 936da85

Please sign in to comment.