0

I use framkework7 swipeout to delete products in my app.

When i swipe to left or right it remains in that position; than a dialog with cancel and ok is showing.

If i press ok > it removes the product on cancel only the dialog is hidding, the product <li> remains swiped.

Can't find no callback to hide/swipe back to right my product.

This is my code:

<li class="swipeout deleted-callback" data-id="my-id-xxx">
    ....
    <div class="swipeout-actions-right">
        <a href="#" data-confirm="Delete?" class="swipeout-delete swipeout-overswipe">Delete</a>
    </div>
</li>

$('.deleted-callback').on('swipeout:deleted', function() {
    deleteProduct($(this).data('id'));
});

Is this a bug or it's just me? Any help with that please?

Thanks

Adrian
  • 491
  • 6
  • 23

1 Answers1

0

For this swipeout to close on cancel you need to do add data-close-on-cancel="true" to anchor tag.

 <li class="swipeout">
  <div class="swipeout-content item-content">
    <div class="item-media">...</div>
    <div class="item-inner">...</div>
  </div>
  <div class="swipeout-actions-right">
        <a href="#" class="swipeout-delete" data-confirm="Are you sure want to delete this item?" data-confirm-title="Delete?" data-close-on-cancel="true">Delete</a>
    </div>
  </div>
</li>