Closed Twentyfoureyes closed 1 year ago
On the DndList there is dndDragOver event emitter. Is that what you are looking for?
Yes, but the event is not triggered, the code is commented out :)
Well, thanks for notifying me :^) I'll check it and update
This doesn't seem to be working. Am I doing something wrong? To my understanding, this should prevent the drag from happening, but it is still happening.
@HostListener('dragover', ['$event'])
dndDragOver(item, list) {
return false;
}
It looks like the source code for this callback is still commented out:
// At this point we invoke the callback, which still can disallow the drop.
// We can't do this earlier because we want to pass the index of the placeholder.
// if (this.dndDragOver &&
// !this.invokeCallback(this.dndDragOver, event, dropEffect, itemType)) {
// return this.stopDragOver();
// }
From https://github.com/misha130/ngx-drag-and-drop-lists/blob/master/src/directives/dnd-list.ts
curious as to why the code that emits the dragOver event is still commented out?
Are you planning on implementing the dragOver? In the angularjs version of this library you could pass a function, which you could make return true or false, to stop the drag or not. That would be nice to have. Currently the dragOver event isn't emitted