We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 41c84d2 commit a82e7f7Copy full SHA for a82e7f7
src/app/todo/todo.component.ts
@@ -26,7 +26,6 @@ export class TodoComponent implements OnInit {
26
this.checkField = new FormControl(false);
27
this.checkField.valueChanges
28
.subscribe(state => {
29
- console.log(state);
30
this.store.dispatch(new TodoActions.ToggleAction(this.todo.id));
31
});
32
}
@@ -37,9 +36,10 @@ export class TodoComponent implements OnInit {
37
36
38
39
updateText() {
40
- if (this.textField.valid) {
+ if (this.textField.valid && this.editing) {
41
const id = this.todo.id;
42
const newText = this.textField.value;
+ this.editing = false;
43
this.store.dispatch(new TodoActions.UpdateAction(id, newText));
44
45
0 commit comments