Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

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

Open
chrillewoodz opened this issue May 20, 2017 · 1 comment

Comments

@chrillewoodz
Copy link
Collaborator

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.

@Viczei
Copy link
Owner

Viczei commented May 23, 2017

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants