Our flexible Kanban board for managing tasks with drag drop


Post by lanpeng »

Hi bryntum team
I have an application scenario where I add some custom dom elements to the swimlane header and bind some custom events on these dom.

    swimlaneRenderer({ swimlaneRecord, swimlaneConfig }) {
        swimlaneConfig.children.header.children.info = {
            class: 'team-info',
            html: `<span>Refresh</span>`

    };
},
Attachments
P3.png
P3.png (27.82 KiB) Viewed 355 times

Post by tasnim »

Hi,

Sorry, I'm not sure what exactly you're trying to achieve. Could you please clarify a bit what exactly you're trying to achieve?


Post by lanpeng »

Hi tasnim.
as these code

swimlaneRenderer({ swimlaneRecord, swimlaneConfig }) {
        swimlaneConfig.children.header.children.info = {
            class: 'team-info',
            html: `<button>Refresh</button>`

};
},

what i mean is that i want add a click event for the refresh button, i can get the swimlaneId when users click it.Request data for the swimlane from the backend based on the swimlaneId.


Post by tasnim »

Hi,

You could probably use the normal dom click event to listen to that button
We have a class called EventHelper which you could use to achieve this
https://bryntum.com/products/taskboard/docs/api/Core/helper/EventHelper#function-on-static

EventHelper.on({
    element  : taskBoard.element,
    delegate : '.team-info',
    click() {
        console.log('click');
    }
});

Hope this will be helpful.


Post by lanpeng »

thanks tasnim.
Unfortunately, the method you provided is not suitable for my requirement.

swimlaneRenderer({ swimlaneRecord, swimlaneConfig }) {
        // console.log(swimlaneConfig)
        swimlaneConfig.children.header.children.icon = {
            tag: 'i',
            class: 'b-fa b-fa-refresh',
            onClick(swimlaneConfig) {
                console.log(swimlaneConfig)
            }

    };
},

Is it possible for the code I provided to take effect? Or could you create a ticket for the feature?


Post by tasnim »

Hi,

I created a ticket to add support for adding a toolbar to swimlane headers, here it is https://github.com/bryntum/support/issues/7177.

Best of luck :),
Tasnim


Post Reply