As below I have a (click) on each item that goes to a detailed view, handled by the itemSelected() method.
Additionally, the user slides to expose Delete/Edit buttons. I want that to be an independent functionality.
What I’m finding is that itemSelected() is always called right after itemDeleted() or itemEdited(). But I am clicking on those sub-buttons, not on the main item itself. Is there a way in itemSelected() to tell where it is called from, or to prevent it being called when the sub-buttons are clicked?
<ion-list>
<ion-item-sliding *ngFor="let item of items" (click)="itemSelected(med)">
<ion-item>
...Some item content...
</ion-item>
<ion-item-options side="right">
<button ion-button color="danger" (click)="itemDeleted(item)"><ion-icon name="trash"></ion-icon></button>
<button ion-button color="default" (click)="itemEdited(item)"><ion-icon name="create"></ion-icon></button>
</ion-item-options>
</ion-item-sliding>
</ion-list>