Overwriting iter-list move in meteor
Hello,
I'm switching the LibreBoard application (made with meteor) from jquery-ui to Sortable. In this application we have cards and lists, and every card is in a list. When the user move a card from list A to B, I don't want to create a new card and remove the old one, but instead I want to update the listId field of the card document.
I tried with onAdd event, which works, but I cannot stop the default behavior from there (I tried event.stopPropagation() which does not work); so immediately after my update happen there is an error in the console saying that the insertion failed because of duplicate _id.
What is the canonical way to update a document after an inter-list move in meteor?
cc @dandv
I think this is related to the react linked lists issue: https://github.com/RubaXa/Sortable/issues/217 . I think we need a way to pass a js method which could update document/application state instead of modify the dom directly.
Hum it seems that there is no way to avoid this line https://github.com/RubaXa/Sortable/blob/master/meteor/reactivize.js#L157 that does this insertion. And yes @mtetlow I believe in this case sortable should not try to update the DOM.
+1
Hi, did this get resolved? Is there an example of moving an item from List A to List B in Meteor, pls?
Dear all! Meteor is moved to the separate repository. If this issue is still actual, please create it there once again.
For your info: this project needs a maintainer.