mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] playground: todo app clear complete tasks
Just fix a little bug when clicked on "Clear Completed" Also removed unusefull method.
This commit is contained in:
committed by
Sam Degueldre
parent
9d99f8936b
commit
9b1c270501
@@ -43,10 +43,6 @@ class TaskList {
|
||||
}
|
||||
}
|
||||
|
||||
toggleTask(task) {
|
||||
task.isCompleted = !task.isCompleted;
|
||||
}
|
||||
|
||||
toggleTask(id) {
|
||||
const task = this.tasks.find(t => t.id === id);
|
||||
task.isCompleted = !task.isCompleted;
|
||||
@@ -61,7 +57,7 @@ class TaskList {
|
||||
clearCompleted() {
|
||||
const tasks = this.tasks.filter(t => t.isCompleted);
|
||||
for (let task of tasks) {
|
||||
this.deleteTask(task);
|
||||
this.deleteTask(task.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user