Skip to main content

indent-task

Description

Fires when indenting a task

Usage

"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 task
  • mode - (boolean) if true, a task becomes a child of the task above

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: