Open Mario8419 opened 2 years ago
Hi, do I understand correctly that you would like the swipe back animation to start after the icon's animation is ended? Now it starts to swipe back after click.
exactly
@Mario8419 Added actionDelay
parameter which will delay the animation and action triggering for specified time.
thanks for adding actionDelay prop, but the problem is that the animation renders in SwipeAction and so it's the same effect like before.
const handleFavoriteCategorySwipe = (id, value) => (
<LeadingActions>
<SwipeAction
onClick={() => updateCategoryFavorite(id, value )}
>
<span>
{data.favorite ?
<FavoriteOnIcon />
:
<img src={favoriteOffIcon} alt='Favorite-Off-Icon' />
}
</span>
</SwipeAction>
</LeadingActions>
)
ok, my bad. Do I understand correctly then we should have separate delay for starting "return animation" and separate for triggering action?
I want to make a little icon animation before the Swipe back onClick but it disappears before and the destructiveCallbackDelay isn't working! Any workaround for this problem? thanks