Page 1 of 1

How to prevent dragging a card from swimlaneA to swimlaneB?

Posted: Wed Aug 17, 2022 7:47 am
by lanpeng

Hi brymtun team
How to prevent dragging a card from swimlaneA to swimlaneB?


Re: How to prevent dragging a card from swimlaneA to swimlaneB?

Posted: Wed Aug 17, 2022 8:20 am
by tasnim

You can check this https://bryntum.com/docs/taskboard/api/TaskBoard/feature/TaskDrag#event-beforeTaskDrop

Here is an example of how you can achieve it:

new Taskboard({
    listeners : {
        beforeTaskDrop(event) {
            const { targetSwimlane } = event;
            if (targetSwimlane.data.id === 'critical') {
                return false
            }
        }
    }
});