angular-ui / ui-sortable

jQuery UI Sortable for AngularJS
http://angular-ui.github.io/ui-sortable/
MIT License
1.26k stars 444 forks source link

'$modelValue.splice' let me get a wrong currentContainer ? #533

Closed 10081677wc closed 7 years ago

10081677wc commented 7 years ago

Hi,

ui.item.sortable.moved = ngModel.$modelValue.splice(ui.item.sortable.index, 1)[0];

This code in callbacks.remove may be some problems? When the dom changed cause by $modelValue, I sometimes get a wrong currentContainer.

thgreasi commented 7 years ago

Can you fork one of the provided examples to reproduce the issue you are facing?

thgreasi commented 7 years ago

Please retest against the just released v0.17.2.

10081677wc commented 7 years ago

Thank you for your advice, unfortunately, the same problem occurs in the v0.17.2, and I find the question https://github.com/angular-ui/ui-sortable/issues/534, it' s a similar situation to mine, I will try to reproduce the issue :)

10081677wc commented 7 years ago

Hi, I find the problem lies in 'track by $index'.

thgreasi commented 7 years ago

Thanks for sharing!