I was trying to follow advice from this link to revert the drop action:
Dragula :revert drop in ng2-dragula
but with no success.
What i want to do is to be able to revert the drag operation under certain conditions. Alternatively on condition disable Dragula altogether.
Html:
.ts file
export class VisibilityConfiguratorComponent implements OnChanges {
colsCopy: ColumnItem[];
constructor(private dragulaService: DragulaService) {
let drake = dragulaService.drop.subscribe((value) => {
this.applyConfig();
});
}
ngOnInit() {
this.dragulaService.setOptions('bag', { moves: (el, container, handle) => { return false; } });
}
}
As you can see I'm trying to disable move entirely but this doesn't seem to have any effect.