TaskSelection
Configs
2
Configs
2Common
Selected tasks.
Selection
A template method (empty by default) allowing you to control if a task can be selected or not.
new TaskBoard({
isTaskSelectable(taskRecord) {
return taskRecord.status !== 'done';
}
})
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel | The task record |
true if the task can be selected, otherwise false
Properties
4
Properties
4Common
Selected tasks.
Class hierarchy
Selection
A template method (empty by default) allowing you to control if a task can be selected or not.
new TaskBoard({
isTaskSelectable(taskRecord) {
return taskRecord.status !== 'done';
}
})
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel | The task record |
true if the task can be selected, otherwise false
Functions
4
Functions
4Deselect all tasks.
Check if the supplied task is selected or not
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel |
Returns true if it is selected, false if not
Select the supplied task, deselecting any previously selected by default.
| Parameter | Type | Description |
|---|---|---|
taskRecord | TaskModel | Task to select |
add | Boolean | Specify |
Events
1
Events
1Triggered when task selection changes.
// Adding a listener using the "on" method
taskSelection.on('selectionChange', ({ source, action, selection, select, deselect }) => {
});| Parameter | Type | Description |
|---|---|---|
source | TaskBoard | TaskBoard instance |
action | select | deselect | Either 'select' or 'deselect', depending on operation |
selection | TaskModel[] | All currently selected tasks |
select | TaskModel[] | Tasks selected by the operation |
deselect | TaskModel[] | Tasks deselected by the operation |
Event handlers
1
Event handlers
1Called when task selection changes.
new TaskSelection({
onSelectionChange({ source, action, selection, select, deselect }) {
}
});| Parameter | Type | Description |
|---|---|---|
source | TaskBoard | TaskBoard instance |
action | select | deselect | Either 'select' or 'deselect', depending on operation |
selection | TaskModel[] | All currently selected tasks |
select | TaskModel[] | Tasks selected by the operation |
deselect | TaskModel[] | Tasks deselected by the operation |