history
Description
Optional. Enables/disables managing the history of changes
info
Usage
history?: boolean;
// or
history?: {
projects?: boolean,
limit?: number
};
Parameters
To configure the history
property, you can use the short or extended approach:
The short approach:
history
- (optional) enables/disables the history of changes in To Do List
The extended approach:
-
history
- (optional) the object with extended settings that configure the history of changes. Here you can specify the following parameters:projects
- (optional) enables/disables the branching of history
infoIf you set the the
projects
parameter totrue
, you will be able to manage the history of changes for each project separately; otherwise, you will be able to manage the history of changes for the whole app.limit
- (optional) limits the number of history operations
Default config
history: true
Example
const { ToDo } = todo;
const { tasks, users, projects } = getData();
// create To Do List
new ToDo("#root", {
tasks,
users,
projects,
history: { projects: false, limit: 20 }
});
Change log: The history
config was added in v1.3
Related API: