跳到主要内容

onAfterSort

Description

在网格中对任务排序后触发

onAfterSort: (field: string | GanttCallback, desc?: boolean, parent?: string | number) => void;

Parameters

  • field - (必填) string | function - 网格按排序的列名,或一个自定义排序函数
  • desc - (可选) boolean - 可选,排序方向:true - 降序,false - 升序
  • parent - (可选) string | number - 可选,父任务的 ID,如果任务仅在指定父任务的分支中排序

Example

gantt.attachEvent("onAfterSort",function(field, direction, parent){
// 在这里插入您的自定义逻辑
});
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.