I do have an ion-list with ion-item-sliding items and want to use an ion-item-options button to delete an item from this list.
This is working, e.g. as in this example: http://www.joshmorony.com/ionic-2-how-to-create-a-sliding-delete-button-for-lists/.
But what I do not like is that the element is removed immediately after the button is clicked. I would like to close the ion-item-options first and after the animation remove the element.
Of course, this is possible with a simple setTimeout. But I would would prefer a solution using a Promise like with the action sheets: actionSheet.dismiss().then(() => {/* … remove item … */});
.
This is not possible, because ItemSliding.close()
does not return a Promise, which would be a nice feature!