Our flexible Kanban board for managing tasks with drag drop


Post by shimnx »

https://bryntum.com/examples/taskboard/swimlanes/
When I Add Swimlane, I want to customize the Swimlane name, can I change its name

Attachments
屏幕截图 2022-07-27 142838.png
屏幕截图 2022-07-27 142838.png (2.49 KiB) Viewed 660 times

Post by mats »

Please see the code, you can customize the swimlane name as you want:

onAddClick() {
        const id = taskBoard.swimlanes.count;

    taskBoard.swimlanes.add({ id, text : `Swimlane #${id}` });
    taskBoard.scrollToSwimlane(id);

    taskBoard.widgetMap.removeButton.disabled = false;
},

Post by shimnx »

I mean I want the user to change the name when the user adds Swimlanes


Post by alex.l »

Not sure I got the problem.
In this case you need to change that handler with desired behaviour. Create a dialog with a textfield (or how do you like to do that) and show it on button click.

All the best,
Alex


Post by shimnx »

alex.l wrote: Wed Jul 27, 2022 11:12 am

Not sure I got the problem.
In this case you need to change that handler with desired behaviour. Create a dialog with a textfield (or how do you like to do that) and show it on button click.

Yes I want users to be able to customize the Swimlane name when creating it, or edit the Swimlane name after creating it. Now the Swimlane name I create is fixed every time I create it, users can't customize it, how do I solve this


Post by alex.l »

Now we don't have built-in edit function for Swimlane. I've opened a FR here https://github.com/bryntum/support/issues/4993
To type a name when create a new Swimlane you need to edit onAddClick method and show a dialog with textbox
Like this https://bryntum.com/docs/taskboard/api/Core/widget/MessageDialog#function-prompt
or create your own https://bryntum.com/docs/taskboard/api/Core/widget/Panel
with https://bryntum.com/docs/taskboard/api/Core/widget/Panel#config-floating true
docs for textfield https://bryntum.com/docs/taskboard/api/Core/widget/TextField
for buttons https://bryntum.com/docs/taskboard/api/Core/widget/Button

All the best,
Alex


Post Reply