Skip to main content

uncheck-task

Description

Fires when a task is marked as uncompleted

Usage

"uncheck-task": ({
id: string | number,
manual?: boolean
}) => void;

Parameters

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

  • id - (required) the id of a task
  • manual - (optional) true if the task is marked as uncompleted in the "manual" mode
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 "uncheck-task" event
list.api.on("uncheck-task", ({id}) => {
console.log("The", id, "task is marked as uncompleted");
});

Related article: Operations with tasks