indent-task
Description
Fires when indenting a taskUsage
"indent-task": ({
id: string | number,
mode: boolean
}) => boolean|void;
Parameters
The callback of the indent-task action can take an object with the following parameters:
id
- (required) the ID of the indented taskmode
- (boolean) if true, a task becomes a child of the task above
info
For handling the actions you can use the Event Bus methods
Example
<script>
import { getData } from "./common/data";
import { Gantt } from "wx-svelte-gantt";
const data = getData();
let api;
$: if (api) {
api.exec("indent-task", {
id: 3,
mode: true,
});
}
</script>
<Gantt
bind:api
tasks={data.tasks}
//other settings />
Related articles: How to access Gantt API