ng2-swipe-cards icon indicating copy to clipboard operation
ng2-swipe-cards copied to clipboard

element.remove() should be swapped for a splice of the original array that is being looped

Open chrillewoodz opened this issue 8 years ago • 1 comments

When using element.remove() you still have to manually remove the card from the original array. Instead I would suggest that the removal happens on the data rather than the element. Because if the original data object is removed, so will the element.

chrillewoodz avatar May 20 '17 14:05 chrillewoodz

Well this would make huge change in the way the component works since until now it only treat the display and not the data itself. Currently it is possible to splice the array item on element destruction with the onRelease callback but it could indeed be improved because it's impossible to know which card was swiped.

Viczei avatar May 23 '17 13:05 Viczei