一个包含内联编辑器定义的对象
gantt.config.editor_types.custom_editor = {// 自定义编辑器逻辑}
此配置用于创建自定义编辑器(如上例所示)。
系统内置了多种内联编辑器:
此处定义的编辑器可以分配给 gantt 的列:
const textEditor = {type: "text", map_to: "text"};
const dateEditor = {type: "date", map_to: "start_date",
min: new Date(2018, 0, 1), max: new Date(2019, 0, 1)};
gantt.config.columns = [
{name: "text", label: "Task name", tree: true, width: "*", editor: textEditor},
{name: "start_date", label: "Start time", align: "center", editor: dateEditor}
];