Skip to main content

unindent-task

Description

Fires when the nesting level of a task is promoted by one

Usage

"unindent-task": ({
id: string | number
}) => void;

Parameters

The callback of the unindent-task event can take an object with the following parameters:

  • id - (required) the id of a task
info

To handle the inner events, you can use the Event Bus methods

Example

const { ToDo, Toolbar } = todo;
const {tasks, projects, users} = getData();

const list = new ToDo("#root", {
tasks,
projects,
users
});

const toolbar = new Toolbar("#toolbar", {
api: list.api,
});

// subscribe to the "unindent-task" event
list.api.on("unindent-task", ({id}) => {
console.log("The nesting level of the", id, "task is promoted by one");
});

Related article: Operations with tasks