Our flexible Kanban board for managing tasks with drag drop


Post by lanpeng »

Hi bryntum team
How to save the swimlane order after swimlaneDrag? Is there a hook function similar to taskDragEnd


Post by tasnim »

Hello,

I'm not sure I got your question. Are you looking for this https://bryntum.com/products/taskboard/docs/api/Scheduler/model/ProjectModel#function-commitAsync

If not could you please explain a bit further?


Post by lanpeng »

Hi tasnim
How to add an eventlistener for swimlaneDrag? I need to drag the swimlane and record the order of the swimlane.


Post by tasnim »

Hi,

Unfortunately, there are no listeners for swimlaneDrag. I've opened a ticket to implement that. Here it is https://github.com/bryntum/support/issues/6140

Workaround:
But swimlane is in a store called swimlanes. And there you could listen for change event
https://bryntum.com/products/taskboard/docs/api/Core/data/Store#event-change

taskboard.swimlanes.on('change', (event) => console.log(event));

All The Best,
Tasnim


Post by lanpeng »

Hi tasnim
I tried your method, but it didn't work.

ngAfterViewInit(): void {
    this.taskboard = this.taskboardComponent.instance;
    this.taskboard.swimlanes.on('change', this.swimlaneChange.bind(this))

  }

  swimlaneChange(e: any) {
    console.log(e)
  }
/code]

Post by tasnim »

Hello lanpeng,

I checked with one of our angular demos but it works fine here.

chrome_7H3cnSgmHM.gif
chrome_7H3cnSgmHM.gif (1.12 MiB) Viewed 699 times

Could you please upload a runnable test case so we could reproduce the issue and debug it?
Or
I've also provided the demo that I've configured with that code, you could compare it with your code

inline-data.zip
(242.03 KiB) Downloaded 70 times

Post by lanpeng »

thanks tasnim .It works welll.


Post Reply