Page 1 of 1

Where can I custom swimlane header?

Posted: Wed May 18, 2022 4:45 pm
by yingtao

I need to custom swimlane header?how can I do?
Image

like this:
Image


Re: Where can I custom swimlane header?

Posted: Thu May 19, 2022 8:02 am
by johan.isaksson

Hi,

This demo has custom content in swimlane headers, please take a look: https://bryntum.com/examples/taskboard/swimlanes-content/

It uses a https://bryntum.com/docs/taskboard/api/TaskBoard/view/TaskBoardBase#config-swimlaneRenderer to achieve it


Re: Where can I custom swimlane header?

Posted: Fri May 20, 2022 11:33 am
by yingtao

I tried and I can do it. But how can I add 'click' event。

Image


Re: Where can I custom swimlane header?

Posted: Fri May 20, 2022 11:51 am
by johan.isaksson

Unfortunately there is no way of adding a listener in a DomConfig, although it would have been nice. Supplying onclick like that will work in the same way as it would if you had it on a normal DOM element, but I would advice against it.

I instead recommend adding a click listener to an ancestor element, taking conditional action based on which element was clicked. You could do it using normal DOM functionality, or with our EventHelper (see https://bryntum.com/docs/taskboard/api/Core/helper/EventHelper#function-on-static):

EventHelper.on({
  element : taskboard.element,
  delegate : '.team-info', // filter clicks, only care about those on team-info elements
  click() {
     // code goes here
  }
});