angular-ui / ui-sortable

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

Connect list cancel bug? #466

Closed natee closed 8 years ago

natee commented 8 years ago

Allows sort when the right side list was empty, otherwise it will be canceled.

In the demos below, first drag an item form right to left, then drag items from left to right.

√ jqueryui: http://codepen.io/anon/pen/mEmZkr × angularui: http://codepen.io/anon/pen/pbPjaO

thgreasi commented 8 years ago

Updated the README and the core example to be more generic and have better code comments. Please check it out since it is in a more complete shape now. Also fixed your pen. All that was needed was an !ui.item.sortable.received check, so that your cancel code runs during the first update() callback (the one that occurs on the originating list).

Thanks for opening this issue and providing both code examples. Really helped me identify that the docs and examples of the repo was not in great shape.