Once I remove 1 element from the list, it stops sliding and I can’t remove other element. the Real problem is that I don’t have reported problems on my consolle . PLEASE HELP
html
<ion-item-sliding *ngFor="let c of table.Consumptions">
<ion-item>
<ion-label>
{{c.Ora}} - {{c.DescConsumazione}}
<p style="color:white">{{c.Tempo}} minuti</p>
</ion-label>
<ion-label>
<p style="color:white" text-right>{{c.Prezzo | currency:'EUR'}}</p>
</ion-label>
</ion-item>
<ion-item-options side="end">
<ion-item-option color="danger" (click)="delete(c)">
<fa-icon [icon]="faTrashAlt"></fa-icon>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
typescript (the function works correctly)
async delete(c) {
this.alertCtrl.create({
header: "Eliminare Consumazione?",
cssClass: "costumAlert",
buttons: [
{ text: "Annulla", role: "cancel" },
{
text: "Elimina",
handler: () => {
this.alertController.create({
header: "Reinserire prodotto in magazzino?",
cssClass: "costumAlert",
buttons: [
{
text: "no",
handler: () => {
c.Recharge = false;
this.table.Consumptions.splice(this.table.Consumptions.indexOf(c), 1);
}
},
{
text: "si",
handler: () => {
c.Recharge = true;
this.table.Consumptions.splice(this.table.Consumptions.indexOf(c), 1);
}
}
]
}).then(alert => alert.present())
}
},
]
}).then(alert => alert.present());