placeholder_task

在任务列表末尾添加一个空行,以便更方便地使用键盘编辑任务

boolean | object placeholder_task;

Example

gantt.config.placeholder_task = true;
 
// 或者
gantt.config.placeholder_task = {
   // 添加新任务后,将焦点移到 placeholder task 上
   focusOnCreate: true
};


Default value:

false

Related samples

Details
  • 在任务列表末尾会自动添加一个空的 placeholder 任务。
  • 当通过 UI 编辑 placeholder 并调用 gantt.updateTask() 时,会在末尾添加一个新任务。
  • 你可以通过检查任务的 type 属性来识别 placeholder:
if(task.type == gantt.config.types.placeholder){
   // 执行某些操作
}
See also
Back to top