Page 1 of 2

how to sort by user-defined rules for swimlane?

Posted: Tue Nov 08, 2022 12:25 pm
by lanpeng

Hi bryntum team,
how to sort by user-defined rules for swimlane?


Re: how to sort by user-defined rules for swimlane?

Posted: Tue Nov 08, 2022 12:46 pm
by tasnim

Re: how to sort by user-defined rules for swimlane?

Posted: Tue Nov 08, 2022 12:58 pm
by lanpeng

Hi tasnim
I used this function,but it did not work.please help me to check these code.

	groupList.forEach((item) => {
                this.taskboard.swimlanes.add({ id: item.groupName, text: item.groupName });
            })
            this.taskboard.swimlanes.addSorter("text", true)

Re: how to sort by user-defined rules for swimlane?

Posted: Tue Nov 08, 2022 1:55 pm
by Animal

I think it needs to you call taskboard.refresh()


Re: how to sort by user-defined rules for swimlane?

Posted: Tue Nov 08, 2022 1:58 pm
by tasnim

If addSorter doesn't work for you then, Please use this https://bryntum.com/docs/taskboard/api/Core/data/Store#function-sort
And TaskBoard doesn't listen for sorting changes on swimlanes
I've created a ticket for that here it is https://github.com/bryntum/support/issues/5543

And as Animal said you need to call refresh after it.

taskBoard.swimlanes.sort('text');
taskBoard.refresh()

So after a refresh, it will apply the sorting.


Re: how to sort by user-defined rules for swimlane?

Posted: Wed Nov 09, 2022 3:02 am
by lanpeng

Hi tasnim,
I tried

taskBoard.refresh()

.But it did not work.
In my demo , groupList has been sorted. Why does it become disorganized after I add grouplist into Swimlane?


Re: how to sort by user-defined rules for swimlane?

Posted: Wed Nov 09, 2022 7:06 am
by tasnim

Could you please provide the demo so we can debug it?


Re: how to sort by user-defined rules for swimlane?

Posted: Wed Nov 09, 2022 12:05 pm
by lanpeng

Hi
I uploaded a demo.please check it.


Re: how to sort by user-defined rules for swimlane?

Posted: Thu Nov 10, 2022 2:45 pm
by alex.l

Thank you for the demo, this is a bug. I've added this info into the ticket. We'll try to fix it asap. Thank you for the report.


Re: how to sort by user-defined rules for swimlane?

Posted: Tue Feb 14, 2023 4:09 am
by lanpeng

Hi ,Has this bug been fixed?