show-completed-tasks
Description
Fires when To Do List is switched to the mode of showing completed tasks
Usage
"show-completed-tasks": () => void;
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 "show-completed-tasks" event
list.api.on("show-completed-tasks", () => {
console.log("The mode of showing of completed tasks is enabled");
});
Change log: Added in v1.1
Related article: Show/hide completed tasks