Hi,
I want to update column tooltip value on task drag event in taskboard column. I have write below code to perform this action:
import { Component, ViewChild, AfterViewInit, ViewEncapsulation } from '@angular/core';
import { BryntumTaskBoardComponent } from '@bryntum/taskboard-angular';
import { Button, TaskBoard, Toast, MessageDialog, StringHelper, ColumnModel } from '@bryntum/taskboard';
import { taskBoardConfig } from './taskboard.config';
@Component({
selector: 'deals-taskboard',
templateUrl: './taskboard.component.html',
styleUrls: ['./taskboard.component.css'],
encapsulation : ViewEncapsulation.None
})
export class TaskboardComponent implements AfterViewInit {
confirm = true;
shouldLog = false;
taskBoardConfig = taskBoardConfig;
@ViewChild(BryntumTaskBoardComponent, { static : false }) taskboardComponent: BryntumTaskBoardComponent;
private taskboard: TaskBoard;
onBeforeTaskDrag({ event }: { event: any }): any {
console.log(this.taskBoardConfig.columns);
this.taskBoardConfig.showCollapseInHeader = false;
// Assuming taskBoardConfig is your TaskBoard configuration object
const columns = this.taskBoardConfig.columns as ColumnModel[];
// Now you can use forEach on the columns array
columns.forEach(column => {
switch (column.id) {
case 'Q1':
column.tooltip = 'New Tooltip for Profile';
column.tasksPerRow = 1;
break;
case 'Q2':
column.tooltip = 'New Tooltip for Demonstrate';
column.tasksPerRow = 1;
break;
// Add more cases for other columns if needed
}
});
}
}
This code changes the tooltip value, but taskboard is not refreshed to display on runtime.
kindly suggest how to achieve this in angular taskboard.
Thanks