Our flexible Kanban board for managing tasks with drag drop


Post by sreyant suraneni »

Hey,
I need the expanded cards and collapsed cards to hold after refresh.
How do I achieve that?


Post by tasnim »

Hi,
I don't understand what you mean by expanded cards and collapsed cards, Could you please explain a bit further what do you mean by that?

Are you talking about swimlanes? https://bryntum.com/docs/taskboard/api/TaskBoard/feature/SwimlaneDrag


Post by sreyant suraneni »

Let me add a screenshots for expanded and collapsed view for reference.

Last edited by sreyant suraneni on Thu Oct 20, 2022 10:57 am, edited 1 time in total.

Post by sreyant suraneni »

I would like to keep the expanded view to show even after refresh.
The same for the collapsed cards.


Post by tasnim »

To achieve that, Add a field to TaskModel to keep track if the card is expanded or collapsed, then apply CSS to expand/collapse based on that field in a task rendered

Here is an example of how you can add a new field

class MyTask extends TaskModel {

static get fields() {
    return [
       // Add a new field
       { name: 'myField', type : 'number', defaultValue : 0 }
    ];
}

...
}

And this is the taskRenderer from docs https://bryntum.com/docs/taskboard/api/TaskBoard/view/TaskBoardBase#config-taskRenderer

Good Luck :),
Tasnim


Post by sreyant suraneni »

Can persist : true be used in this case?


Post by tasnim »

I don't understand, Could you please explain?


Post Reply