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

ui-sortable-stop not working every time in ui-sortable #556

Open ghost opened 5 years ago

ghost commented 5 years ago

here you can see i have gave 'uiSortable01Stop' as value to attribute ui-sortable-stop, so function uiSortable01Stop should be called everytime i reorder items under ng-repeat, but its not consistance, some time it misses the callback, and that's why my whole code gets screwed.

let me know if i am implementing it in wrong way. please suggest some solution for this. thanks in advance.

Below code is pasted : ` <ul class="nav nav-pills shortable-tab nav-pills--success" id="m_sortable" role="tablist" ng-model="parentdata.samples" ng-if="data.is_default != '1'" ng-model="parentdata.samples" ui-sortable ui-sortable-start="uiSortable01Start" ui-sortable-stop="uiSortable01Stop"

  • `

    thgreasi commented 5 years ago

    Hi, Could you try to remove the ng-if from your code and also try to use the ui-sortable="options" as the way to define the callbacks and see how it behaves? If you still face an issue, then please fork one of the codepen examples found in README, so that we can troubleshoot this further.