Our flexible Kanban board for managing tasks with drag drop


Post by greg »

Is there a way to use custom react node in task render function, for example:

const taskRenderer = ({ cardConfig, taskRecord }: any) => {
    cardConfig.children.body.children.details = {
      html: <CardBody />
    };
};

This example renders [object Object], I also tried tag property and passing string instead of object, but with no luck.
I need a way to dynamically load different cards.
This is just a simple example, but I would also pass the props to my CardBody component.

Thanks


Post by Maxim Gorkovsky »

Hello.
This is not yet supported, I opened a feature request: https://github.com/bryntum/support/issues/3972 There is a related feature request: https://github.com/bryntum/support/issues/3452


Post by johan.isaksson »

I added this info to the ticket, figured it might help someone here too:

I am afraid there isn't anything new to report on this issue yet. But you should be able to listen to the renderTask och TaskBoard, which is triggered when a tasks element is available. In the listener you could portal in your React component. You would have to manage cleanup of it too in a removeTaskElement listener.

https://bryntum.com/docs/taskboard/api/TaskBoard/view/mixin/TaskBoardDomEvents#event-renderTask

Best regards,
Johan Isaksson

Post Reply