diff --git a/src/app/main/content/apps/todo/todo-details/todo-details.component.ts b/src/app/main/content/apps/todo/todo-details/todo-details.component.ts
index 7e6574c4..9d9666b8 100644
--- a/src/app/main/content/apps/todo/todo-details/todo-details.component.ts
+++ b/src/app/main/content/apps/todo/todo-details/todo-details.component.ts
@@ -36,14 +36,14 @@ export class FuseTodoDetailsComponent implements OnInit, OnDestroy
// Subscribe to update the current todo
this.onCurrentTodoChanged =
this.todoService.onCurrentTodoChanged
- .subscribe(todo => {
+ .subscribe(([todo, formType]) => {
- this.formType = 'edit';
-
- this.todo = todo;
-
- if ( this.todo )
+ if ( todo && formType === 'edit' )
{
+ this.formType = 'edit';
+
+ this.todo = todo;
+
this.todoForm = this.createTodoForm();
this.onFormChange = this.todoForm.valueChanges
@@ -70,6 +70,7 @@ export class FuseTodoDetailsComponent implements OnInit, OnDestroy
this.formType = 'new';
this.todoForm = this.createTodoForm();
this.focusTitleField();
+ this.todoService.onCurrentTodoChanged.next([this.todo, 'new']);
});
}
diff --git a/src/app/main/content/apps/todo/todo.component.html b/src/app/main/content/apps/todo/todo.component.html
index e1db6676..e8932198 100644
--- a/src/app/main/content/apps/todo/todo.component.html
+++ b/src/app/main/content/apps/todo/todo.component.html
@@ -41,7 +41,7 @@