Hi Team,
I am working on adding a dropdown selector to my location column,
{ type : 'locationcolumn', field: 'location', text : 'Location'},
that displays a list of locations to choose from. I am building a custom js file called LocationColumn.js for this column:
/**
* Status Column implementation file
*/
// Bryntum umd lite bundle comes without polyfills to support Angular's zone.js
import { Column, ColumnStore } from '@bryntum/gantt/gantt.lite.umd.js';
/**
* @module LocationColumn
*/
/**
* A column showing the status of a task
*
* @extends Gantt/column/Column
* @classType locationcolumn
*/
export default class LocationColumn extends Column {
static get $name() {
return 'LocationColumn';
}
static get type() {
return 'locationcolumn';
}
static get isGanttColumn() {
return true;
}
static get defaults() {
return {
// Set your default instance config properties here
field : 'location',
text : 'Location',
editor : false,
cellCls : 'b-status-column-cell',
htmlEncode : false,
editor : {
type : 'combo',
items : []
}
};
}
//endregion
renderer({ record }) {
const itemList = []
record._parent.children.forEach(element => {
itemList.push(element._data.location)
});
this.data.editor.items = itemList
return location
}
}
ColumnStore.registerColumnType(LocationColumn);
When I run my code I do not get any errors until I expand my tasks and double click on the column cell, then I get
in my browser console.
I know this was a known issue in the past after doing some research viewtopic.php?f=44&t=12097&start=10
Is there a best practice here that I am missing? I attached a copy of my gantt.config.ts as well
Thanks,
Brandon