angular-legacy-sortablejs icon indicating copy to clipboard operation
angular-legacy-sortablejs copied to clipboard

In multiple lists, does not remove the previous "pull" item from data model

Open ericjames opened this issue 8 years ago • 0 comments
trafficstars

Your examples show moving between pre-existing DOM elements in multiple lists, but in Angular all DOM elements are generated via the data model.

When moving from one list to another, it succeeds moving the DOM item and the data item, BUT it does not remove it from the previous data list. The previous list reappears as if cloned. It doesn't appear to know to remove from the data model which would certainly be an Angular specific thing.

I had to plug into onRemove: and do a dirty check of the removed evt.model attribute (ie: id) from the actual scope variable.

$scope.manyLists = [[{id:1}],[{id:2}],[{id:3}]];

<my-dir items="manyLists[0]"></my-div>
<my-dir items="manyLists[1]"></my-div>
<my-dir items="manyLists[2]"></my-div>

Will this be solved by https://github.com/SortableJS/angular-legacy-sortablejs/pull/36?

ericjames avatar Sep 28 '17 20:09 ericjames