Reactive Forms. FormControlName into FormArray


#1

Hello everyone.
Please take a look on the code below:

<StackLayout formArrayName="operators">
                <ListView [items]="equipmentForm.get('operators').value">
                    <ng-template let-operator="item" let-i=index>
                        <GridLayout rows="auto" columns="auto, *">
                            <Label col="0" row="0" text="tel" textWrap="true"></Label>
                            <TextField [formControlName]="i" col="1" row="0" autocorrect="false" hint="inform operators"></TextField>
                        </GridLayout>
                    </ng-template>
                </ListView>
                <Button text="Add operator" (tap)="addOperator()"></Button>
            </StackLayout>

It works as expected, however the text field used to input the information loses focus on each single typed keyboard key. It is definitely related with [formControlName]=“i” but I can’t figure out how to solve it.

Than you for your comments.