Is it possible to get no animation when calling $ionicListDelegate.closeOptionButtons(); ?
I put a “delete” button inside item-options to delete a list item.
It works properly but when item is deleted, a new data is immediately affected to the item (normal).
But the problem with this is that I can click multiple time on my “delete” button before item-options gets fully closed and delete multiple items.
That’s why i’d like to close the item-options directly with no animation. Plus it would be less disturbing for the user than seing the deleted item still animating but with a new data inside it.
A flag to avoid deleting item during a small amount of time is indeed a solution i had in mind but i’m still not a big fan of having the closing animation on the same “visual” item but already populated with a new data : /
I’d also like to avoid having a loader that would slow down the navigation experience.
Closing THEN deleting the item would also slightly slow down the experience but is still the best of the solutions i have right now in term of UX.
Wouldn’t it be possible get a boolean as parameter of closeOptionButtons() to disable the animation if necessary ?
I guess there’s no easy way to achieve what i’d like to do right now ?
And in my controller i simply set the canClick flag to false on an item’s deletion, and set it back to true after a short delay on a $timeout. A zero milliseconds delay seems to work (probably acts like a “next render” delay) but i set a 50ms as a safer solution.
I need the delay otherwise after deleting an item it would fire the ng-click handler on the “new” item.