ngx-sortablejs
ngx-sortablejs copied to clipboard
Problem with sorting multiple of the same cloned element
Hello,
I have a problem with sorting after cloning multiple of the same element - the view and the binded array does not match.

to reproduce the problem add the same element multiple times and sort the list after, after sorting a couple of times the array and ui does not match, you can use the following plunker :
https://plnkr.co/edit/ZSUQDErpoD1tQY5mvVd7?p=preview
Hi @Federen
for me changing sort: false to revertClone: true and removing the clone from the target list (looks like) solved the problem
normalOptions1: SortablejsOptions = {
group: {
name : 'normal-group',
pull: "clone",
put: false,
revertClone: true,
},
};
normalOptions2: SortablejsOptions = {
group: {
name : 'normal-group',
}
};
Please let me know if this fixed the issue
for me the problem still exist, i pull in element 1 from normallist1 5 times to the top and reorder normallist2 and this occurs (the element object should be second to last)