angular-drag-and-drop-lists
angular-drag-and-drop-lists copied to clipboard
"Uncaught TypeError: Cannot set property 'effectAllowed' of undefined" when attempting to drag
<ul dnd-list="models.lists.A"> <li ng-repeat="item in models.lists.A" dnd-draggable="item" dnd-moved="list.splice($index, 1)" dnd-effect-allowed="move" dnd-selected="models.selected = item" ng-class="{'selected': models.selected === item}" > {{item.label}} </li> </ul>
$scope.models = { selected: null, lists: {"A": [], "B": []} }; // Generate initial model for (var i = 1; i <= 3; ++i) { $scope.models.lists.A.push({label: "Item A" + i}); $scope.models.lists.B.push({label: "Item B" + i}); }
That is my js and html... pretty much copied it straight out of the basic demo. list A is displayed just fine, but once I click and hold on an item, I get a ton of console logs with this error: "Uncaught TypeError: Cannot set property 'effectAllowed' of undefined"
Any ideas?
In my case same issue was caused by conflict with another drag&drop library (jquery.event.drag, which hijacks drag events)
I am having same conflict issue,...is there a way to fix this problem?