Page 1 of 1

How to save the current swimlane order after swimlaneDrag

Posted: Thu Feb 09, 2023 10:36 am
by lanpeng

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


Re: How to save the current swimlane order after swimlaneDrag

Posted: Thu Feb 09, 2023 1:16 pm
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?


Re: How to save the current swimlane order after swimlaneDrag

Posted: Thu Feb 09, 2023 2:22 pm
by lanpeng

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


Re: How to save the current swimlane order after swimlaneDrag

Posted: Thu Feb 09, 2023 2:50 pm
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


Re: How to save the current swimlane order after swimlaneDrag

Posted: Wed Feb 15, 2023 8:36 am
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]

Re: How to save the current swimlane order after swimlaneDrag

Posted: Wed Feb 15, 2023 12:24 pm
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 845 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 76 times

Re: How to save the current swimlane order after swimlaneDrag

Posted: Mon Feb 20, 2023 9:33 am
by lanpeng

thanks tasnim .It works welll.