Hello!!
I have a question. I have a ion-list with the swipe option to show some buttons, and expandable swipe to delete right away.
My code is:
<ion-list>
<ion-item-sliding ...>
<ion-item text-wrap>
<p>{{task.content}}</p>
</ion-item>
<ion-item-options (ionSwipe)="finishTask(task)">
<button danger (click)="deleteTask(task)">
<ion-icon name="trash"></ion-icon>
</button>
<button secondary expandable (click)="finishTask(task)">
<ion-icon name="checkmark"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
</ion-list>
The thing is, when I delete an item I would like to show that space with a green background and a “UNDO” option, in order to get back that item. And show this for 3 or 4 seconds. Like the Gmail mobile app when you swipe to delete an email, you could undo that.
Is this possible???
Or, if I show a Toast after swipe an item, can I add the “UNDO” button inside that Toast???
Thanks in advance!