ui-sortable icon indicating copy to clipboard operation
ui-sortable copied to clipboard

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

Open ghost opened this issue 7 years ago • 1 comments

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" > <li class="nav-item mt-3" ng-repeat="sample in parentdata.samples track by $index"> <p class="text-center">sample {{($index + 1)}}</p> <a class="nav-link" data-toggle="tab" href="javascript:void(0)" ng-class="{'active' : (sample.activesample)}" ng-show="!sample.editing" ng-click="setActivesample($index)" ng-dblclick="startEditingsample($index)" > {{sample.metedata.sample_name}} </a> <input type="text" name="sample_name" id="sample_name" class="form-control m-input" ng-model="sample.metedata.new_name" ng-show="sample.editing" ng-enter="saveEditingsample($index)" ng-escape="discardEditingsample($index)" > </li> <li class="align-self-end"><a href="javascript:void(0)" ng-click="addNewsample()"><i class="fa fa-plus-circle"></i></a></li> </ul>

ghost avatar Sep 14 '18 12:09 ghost

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.

thgreasi avatar May 24 '19 10:05 thgreasi