I have customized the StatusColumn column, which is of the dropdown type. By default, it has four options: 'To Do', 'Doing', 'Done', 'Cancelled'. My question is how to manually modify these default options
import { Column, ColumnStore } from '@bryntum/gantt';
/**
* @module StatusColumn
*/
/**
* A column showing the status of a task
*
* @extends Gantt/column/Column
* @classType statuscolumn
*/
export default class StatusColumn extends Column {
static get $name() {
return 'StatusColumn';
}
static get type() {
return 'statuscolumn';
}
static get isGanttColumn() {
return true;
}
static get defaults() {
return {
// Set your default instance config properties here
field : 'status',
text : 'Status',
editor : {
type : 'dropdown',
items : ['To Do', 'Doing', 'Done', 'Cancelled']
},
cellCls : 'b-status-column-cell',
htmlEncode : false,
};
}
//endregion
renderer({ record,isExport}) {
const status = record.status;
// console.log(record)
if(isExport){
return status
}else{
return status ? {
// tag : 'i',
className : `${status}`,
html : status
} : '';
}
}
}
ColumnStore.registerColumnType(StatusColumn);