getState
returns the reactive state object of ToDo
object getState();
Example
const state = $$("todo").getState();
Details
The returned state object contains the following properties:
{
filter: "",
show: "all",
activeProject: "$empty",
readonly: false
}
Properties
- filter (string) - activates filtering. Widget will only show tasks containing this string.
- show (string) - displays tasks depending on the status. Possible options are:
- "active"
- "completed"
- "all" (default)
- activeProject (string|number) - sets the active project. "$empty" by default (no project).
- readonly (boolean) - toggles the ability to edit tasks. False by default.
Back to top