We've created a custom column as a test in our Vue project. However when we edit the cell within the Gantt, the edited value is not displayed directly (it still displays the original value). Only if you for instance sort the Gantt, the edited value is displayed. Do we need to add some more code to refresh the cell after the edit? In the example projects the custom columns are not editable, so we could not find the answer within the examples.
import { Column, ColumnStore } from '../../../../../../node_modules/bryntum-gantt';
export default class TypeColumn extends Column {
static get type() {
return 'typecolumn';
}
static get isGanttColumn() {
return true;
}
static get defaults() {
return {
text : 'Type',
editor : {
type : 'textfield'
}
}
}
renderer({ value}) {
return value;
}
}
ColumnStore.registerColumnType(TypeColumn);
I'm having an issue sort of like the above. I'm using an extended AssignmentModel, adding some custom fields like 'scheduled date':
class SpsAssignmentModel extends AssignmentModel {
static get idField() {
return "code";
}
static get fields() {
return [
{ name : 'code', type : 'textfield', dataSource : 'code' },
{ name : 'workorder', type : 'textfield', dataSource : 'workorder' },
{ name : 'activity', type : 'textfield', dataSource : 'activity' },
{ name : 'trade', type : 'textfield', dataSource : 'trade' },
{ name : 'department', type : 'textfield', dataSource : 'department' },
{ name : 'scheduler', type : 'textfield', dataSource : 'scheduler' },
{ name : 'scheduleddate', type : 'date', dataSource: 'scheduleddate' },
{ name : 'recordid', type : 'number' },
{ name : 'starttime', type : 'textfield', dataSource : 'starttime' },
{ name : 'endtime', type : 'textfield', dataSource : 'endtime' },
{ name : 'comment', type : 'textfield', dataSource : 'comment' }
];
}
[...]
Then I've altered the resource assignment picker like in the demo, adding a column to change this scheduled date:
type : 'resourceavatar',
editor : {
type : AssignmentField.type,
picker : {
width : 500,
// This config is applied over the provided picker grid's config
// Object based configs are merged. The columns, being an array is concatenated
// onto the provided column set.
grid : {
features : {
filterBar : true,
group : 'resource.trade'
},
columns : [
// below is showing value but not editing correctly
{
text : 'Datum',
field : 'assignment.scheduleddate',
type : 'date',
format : "DD-MM-YYYY",
editor : {
type : 'date',
field : 'assignment.scheduleddate',
format : "DD-MM-YYYY"
},
width : 100,
filterable : false
},
]
}
}
}
This is working as far as it is displaying the value: