跳到主要内容

键盘导航扩展

请参阅文章 键盘导航 了解关于键盘导航扩展的详细信息。

The keyboardNavigation 对象具备以下 API:

方法

  • focus (config): void - 允许在网格中选择任意单元格。仅当 Grid 已获得焦点时才起作用

    • config - (object) - 配置对象
      • id - (number | string) - 编辑任务的 id
      • column - (string) - 列名
      • type - (string) - 范围类型。可选值: "gantt", "taskRow", "taskCell", "headerCell"
gantt.ext.keyboardNavigation.focus({type:"taskCell",id:"taskId",column:"columnName"});

相关示例 选择网格单元格

  • getActiveNode (): boolean | void - 允许获取活动单元格的信息
var active_node = gantt.ext.keyboardNavigation.getActiveNode();
// -> {type: "taskCell", id: "10", column: "text"}

相关示例 获取活动单元格

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.