Hi,
I’m having a little bit of a fight with ion-item inside a ion-item-sliding
my code:
<ion-list>
<ion-item-sliding *ngFor="let d of dipendenti; let i=index">
<ion-item text-wrap (click)="toggleGroup(i)" [ngClass]="{active: isGroupShown(i)}" tappable>
<ion-row>
<ion-col col-2 class="dropdown-container">
<ion-title>
<ion-icon [name]="isGroupShown(i) ? 'arrow-dropdown' : 'arrow-dropright'"></ion-icon>
</ion-title>
</ion-col>
<ion-col col-9>
<ion-title text-wrap>
<span text-wrap>
{{d.cognome}} {{d.nome}} - {{d.tipologia_out}}
</span>
</ion-title>
</ion-col>
</ion-row>
<ion-row *ngIf="isGroupShown(i)">
<ion-col col-6>
Stato: {{d.status}}
</ion-col>
<ion-col col-6>
Email: {{d.email}}
</ion-col>
<ion-col col-6>
Tel: {{d.tel}}
</ion-col>
<ion-col col-6>
Indirizzo:{{d.indirizzo}}
</ion-col>
</ion-row>
</ion-item>
<ion-item-options side="right">
<button ion-button (click)="editDipendente(d)" color="success">
<ion-icon name="create"></ion-icon>
Modifica
</button>
<button ion-button (click)="deleteDipendente(d)" color="danger">
<ion-icon name="trash"></ion-icon>
Elimina
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
my problem is: toggleGroup() inside ion-item is not fired at the first time, but after I drag the item to show the item-options, ion-item’s toggleGroup() start to work as expected
thank for the help,
Alessio