Premium support for our pure JavaScript UI components

Post by takafumi ohtake »


I use
However, when I add fields with, the added field values is absent in the returned json.

Is there a way to include the added field in json?

   name: 'custom_1',
   type: 'string',

record['custom_1'] = 'test';
console.log(record['custom_1']); // output: 'test'
console.log(record.toJSON()); // custom_1 is absent

Post by takafumi ohtake »

In addition, I found another issue.
When I add a aggregate type column dynamically, parent rows doesn't refresh automatically.
It can be reproduced with the demo using the code below.

(379.86 KiB) Downloaded 18 times
gantt.project.taskModelClass.addField({name: 'custom_2', type: 'number'});
gantt.columns.add({id: 'custom_2', field: 'custom_2', text: 'Budget', type: 'aggregate'})

Post by alex.l »

Thank you for the report. Fields which dynamically added to Model class will be available only for new created instances and won't be catch by already created records. That causes both problems you reported. I've opened a ticket to fix this moment.

All the best,

Post Reply