Skip to main content

readonly

Description

Optional. Makes To Do List readonly

tip

After you enable the readonly mode, the add Task button and 3 dots icons will be hidden in the toolbar and list

In the readonly mode it is only possible to mark tasks as completed/uncompleted

Usage

readonly?: boolean;

Default config

readonly: false // readonly mode is disabled

Example

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

// create To do list
const list = new ToDo("#root", {
tasks,
users,
projects,
readonly: true
});

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

Related article: Read-only mode