Skip to main content

API overview

To Do List methods

NameDescription
addProject()Adds a new project
addTask()Adds a new task into the list
assignUser()Assigns a person to the specified task
checkTask()Marks a task as complete
closeInlineEditor()Closes the inline editor of a task/project
collapseTask()Collapses a task by its id
copyTask()Copies a task into the clipboard and pastes into the specified position
deleteProject()Removes a project
deleteTask()Removes the specified task from DataStore
destructor()Removes all HTML elements of the To Do List, and detaches all related events
eachSelected()Iterates over all selected tasks
existsProject()Checks whether the specified project exists in DataStore
existsTask()Checks whether the specified task exists in DataStore
expandTask()Expands a collapsed task by its id
getChildrenIds()Returns the IDs of child tasks of the specified parent task
getParentIds()Returns the IDs of parent tasks of the specified child task
getProject()Gets an object of the project by its ID
getSelection()Gets an array with ID of the selected task
getTask()Gets an object of the task by its ID
hasChildren()Checks whether the specified task has child tasks
hideCompletedTasks()Switches To Do List to the mode when completed tasks are hidden from the page
indentTask()Demotes the nesting level of the task to one lower level, depending on the nearby task
moveTask()Moves a task to the specified position
openInlineEditor()Opens the inline editor of a task/project
parse()Loads data into To Do List
pasteTask()Pastes the copied task from the clipboard into the specified position
selectTask()Selects the specified task by its ID
serialize()Serializes data of To Do List into a JSON object
setConfig()Sets a new configuration for the To Do List
setLocale()Sets the specified locale for To Do List
setFilter()Filters tasks by the specified criteria within an active project
setProject()Sets the specified project as an active one
setSort()Sorts tasks of the active project by the specified parameters
showCompletedTasks()Switches To Do List to the mode when completed tasks are shown on the page
unassignUser()Unassigns a person from the specified task
uncheckTask()Marks a task as incomplete
unindentTask()Promotes the nesting level of the task to one higher level, depending on the nearby task
unselectTask()Unselects a task(s)
updateProject()Updates configuration parameters of a project
updateTask()Updates configuration parameters of a task

To Do List internal API

Event Bus methods

NameDescription
api.exec()Allows triggering the inner events
api.intercept()Allows intercepting and preventing the inner events
api.on()Allows attaching a handler to the inner events
api.setNext()Allows adding some action into the Event Bus order

State methods

NameDescription
api.getReactiveState()Gets an object with the reactive properties of the DataStore of To Do List
api.getState()Gets an object with the current properties of the DataStore of To Do List
api.getStores()Gets an object with the DataStore object of To Do List

To Do List events

NameDescription
add-projectFires when adding a new project
add-taskFires when adding a new task
assign-userFires when a user is assigned to a task
check-taskFires when a task is marked as completed
clone-taskFires when a task is pasted from the clipboard into the specified position
close-inline-editorFires when closing the inline editor of a task/project
close-menuFires when closing the menu
collapse-taskFires when collapsing a task
copy-taskFires when a task is copied into the clipboard
delete-projectFires when removing a project
delete-taskFires when removing a task
dragFires when the user is dragging the tasks
edit-itemFires when the value of a task/project is edited via the inline editor
end-dragFires when dragging of tasks has been finished
expand-taskFires when expanding a task
hide-completed-tasksFires when To Do List is switched to the mode of hiding completed tasks
indent-taskFires when the nesting level of a task is demoted by one
keypress-on-todoFires when a task is in focus at the time of using key navigation
move-taskFires when moving a task
open-inline-editorFires when opening the inline editor of a task/project
open-menuFires when opening the menu
paste-taskFires when a task is pasted from the clipboard into the specified position
select-taskFires when selecting a task
set-filterFires when filtering data by the specified criteria
set-projectFires when changing the active project
set-sortFires when sorting tasks
show-completed-tasksFires when To Do List is switched to the mode of showing completed tasks
start-dragFires when the user starts to drag the tasks
unassign-userFires when a user is unassigned from a task
uncheck-taskFires when a task is marked as uncompleted
unindent-taskFires when the nesting level of a task is promoted by one
unselect-taskFires when unselecting a task
update-projectFires when updating a project
update-taskFires when updating a task

To Do List properties

NameDescription
activeProjectOptional. The ID of the active project
dragOptional. Specifies settings for drag-n-drop
idOptional. The ID of the To Do List
localeOptional. Applies the necessary locale to the component
prioritiesOptional. Specifies an array of objects containing the priorities data
projectsOptional. Specifies an array of project objects to set into the list
readonlyOptional. Makes To Do List readonly
selectedOptional. An array with IDs of the tasks which need to be selected on initialization of To Do List
tagsOptional. An array of hashtags to be shown by default
tasksRequired. Specifies an array of task objects to set into the list
taskShapeOptional. An object with settings for the appearance of tasks
usersOptional. Specifies an array of objects containing the users data