@Ekeilholz wrote:
Hi!
I have a sliding list in my Ionic project, where your can accept or decline invitations. My code looks like so :<ion-item-sliding *ngFor="let invite of invites"> <ion-item> <h2>{{invite.friend}}</h2> <p>Invite expires {{ invite.expiresOn | humanize }}</p> </ion-item> <ion-item-options side="left"> <button ion-button color="primary" (click)="acceptInvite($event, invite)"> <ion-icon name="checkmark-circle"></ion-icon> Accept </button> </ion-item-options> <ion-item-options side="right"> <button ion-button color="danger" (click)="declineInvite($event, invite)"> <ion-icon name="trash"></ion-icon> Delete </button> </ion-item-options> </ion-item-sliding>
Now when you click one of the buttons, the click event of the other button is raised as well. So when you click the accept button, both the accept and the decline button events fire, and when you click the decline button, same story. Any ideas to solve this?
Posts: 3
Participants: 2