marceljuenemann / angular-drag-and-drop-lists

Angular directives for sorting nested lists using the HTML5 Drag & Drop API
MIT License
2.16k stars 713 forks source link

dnd-drop overwrites dnd-moved #513

Open erperejildo opened 4 years ago

erperejildo commented 4 years ago

I had the second one working fine but since I added a empty dnd-drop it doesn't work:

<ul dnd-list="list" dnd-drop="onDrop(list, item, index)">
                <li ng-repeat="item in list"
                    dnd-draggable="item"
                    dnd-effect-allowed="move"
                    dnd-moved="list.splice($index, 1)"
                    ng-class="{selected: models.selected === item}"
                    ng-include="item.type + '.html'">
                </li>
            </ul>
$scope.onDrop = function(list, item, index) {
        console.log("finished ")
      };