Hello everyone.
I want the same process of list editing as in the next two pictures.
I tried to do it with ngFor and by giving an index to the value I’m displaying in this ngFor, but I’m struggling to find a solution on how to recognize which element has been selected in the toggle (or radio button, whatever), so basically which element should be removed from the display.
HTML
<div *ngIf="isModified" class="extListAction">
<ion-label><b><u>Liste des actions :</u></b></ion-label>
<div>
<ion-list>
<ion-radio-group [(ngModel)]="idActionSuppress">
<ion-item detail lines="none" *ngFor="let action of newActionList; index as index">
<ion-radio value="{{index}}" (click)="showMe()"></ion-radio>
<ion-label class="ion-text-wrap">
<h3><b>{{index}} {{action.Action1}}</b></h3>
<ion-chip class="chip">
<ion-icon class="chip" name="checkmark"></ion-icon>
<ion-label>Tâche active</ion-label>
</ion-chip>
<ion-chip class="chip" *ngIf="action.support === 2">
<ion-icon class="chip" name="hourglass" ></ion-icon>
<ion-label>Support demandé</ion-label>
</ion-chip>
</ion-label>
</ion-item>
</ion-radio-group>
</ion-list>
</div>
</div>