Skip to content

Commit

Permalink
Todo fix update function1
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin-Re committed Apr 17, 2022
1 parent 235cdad commit 093475f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,12 @@ class Controller {
this.popup.lastElementChild.style.display="none";
// Disable the trash can while editing
icon.parentElement.nextElementSibling.firstChild.style.display="none";
// Also disable other todos to be clicked
// Add an update button (which will update not add a new one)
const updateButton = document.createElement("button");
updateButton.textContent="update";
this.popup.appendChild(updateButton);
// Add event listener to the update button
let todoTitle = this.todoInputField.value;
let todoDate = this.todoDate.value;
let todoPrio = this.todoPrio.value;
Expand Down

0 comments on commit 093475f

Please sign in to comment.