|
1 | 1 | <div [ngSwitch]="field.view" *ngIf="group" [formGroup]="group">
|
2 |
| - <input [id]="field.id" *ngSwitchCase="'string'" type="text" [formControl]="control" [placeholder]="field.getPlaceholder()" |
3 |
| - class="input"> |
| 2 | + <input [id]="field.id" *ngSwitchCase="'string'" type="text" [formControl]="control" |
| 3 | + [placeholder]="field.getPlaceholder()" class="input" [ecFocus]="focusEvent" /> |
4 | 4 |
|
5 |
| - <textarea [id]="field.id" *ngSwitchCase="'textarea'" type="text" [formControl]="control" [placeholder]="field.getPlaceholder()" |
6 |
| - class="input"></textarea> |
| 5 | + <textarea [id]="field.id" *ngSwitchCase="'textarea'" type="text" [formControl]="control" |
| 6 | + [placeholder]="field.getPlaceholder()" class="input" [ecFocus]="focusEvent"></textarea> |
7 | 7 |
|
8 |
| - <input [id]="field.id" *ngSwitchCase="'number'" type="number" [formControl]="control" [placeholder]="field.getPlaceholder()" |
9 |
| - class="input"> |
| 8 | + <input [id]="field.id" *ngSwitchCase="'number'" type="number" [formControl]="control" |
| 9 | + [placeholder]="field.getPlaceholder()" class="input" [ecFocus]="focusEvent"> |
10 | 10 |
|
11 | 11 | <div class="ec-input_color" *ngSwitchCase="'color'">
|
12 | 12 | <label [style.backgroundColor]="control.value">
|
|
19 | 19 | {{field.placeholder}}
|
20 | 20 | </label>
|
21 | 21 |
|
22 |
| - <input [id]="field.id" *ngSwitchCase="'email'" type="email" [formControl]="control" [placeholder]="field.getPlaceholder()" |
23 |
| - class="input"> |
| 22 | + <input [id]="field.id" *ngSwitchCase="'email'" type="email" [formControl]="control" |
| 23 | + [placeholder]="field.getPlaceholder()" class="input" [ecFocus]="focusEvent"> |
24 | 24 |
|
25 | 25 | <input [id]="field.id" *ngSwitchCase="'url'" type="url" [formControl]="control" [placeholder]="field.getPlaceholder()"
|
26 |
| - class="input"> |
| 26 | + class="input" [ecFocus]="focusEvent"> |
27 | 27 |
|
28 |
| - <ec-toggle [id]="field.id" *ngSwitchCase="'toggle'" [formControl]="control" [placeholder]="field.getPlaceholder()"></ec-toggle> |
| 28 | + <ec-toggle [id]="field.id" *ngSwitchCase="'toggle'" [formControl]="control" [placeholder]="field.getPlaceholder()"> |
| 29 | + </ec-toggle> |
29 | 30 |
|
30 | 31 | <ec-datetime *ngSwitchCase="'date'" [formControl]="control" [placeholder]="field.getPlaceholder()"></ec-datetime>
|
31 | 32 |
|
32 |
| - <select [id]="field.id" [formControl]="control" *ngSwitchCase="'select'" (change)="control.patchValue($event.target.value)" |
33 |
| - class="input"> |
| 33 | + <select [id]="field.id" [formControl]="control" *ngSwitchCase="'select'" [ecFocus]="focusEvent" |
| 34 | + (change)="control.patchValue($event.target.value)" class="input"> |
34 | 35 | <option></option>
|
35 |
| - <option *ngFor="let option of field.values" [selected]="control.value===(option.value?option.value:option)" [value]="option.value?option.value:option"> |
| 36 | + <option *ngFor="let option of field.values" [selected]="control.value===(option.value?option.value:option)" |
| 37 | + [value]="option.value?option.value:option"> |
36 | 38 | {{option.label?option.label:option}}
|
37 | 39 | </option>
|
38 | 40 | </select>
|
|
0 commit comments