Skip to content

Commit

Permalink
update title on main if it's present while editing
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorVilas committed Jan 17, 2023
1 parent 599897d commit b078a53
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/modules/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -831,10 +831,13 @@ export const ui = (() => {
todoHandler.editProjectTitle(projectIdx, this.value);
//edit title of active project if the editing title is for it
const titleCards = document.querySelector("h1");
const titleProjectMain = document.querySelectorAll(".main-page-title");
if(projectIdx === titleCards.dataset.projectIdx) {
titleCards.innerText = this.value;
titleCards.title = this.value;
};
} else if(titleProjectMain.length > 0){
titleProjectMain[projectIdx].innerText = this.value;
}
}

function filterTodos(){
Expand Down

0 comments on commit b078a53

Please sign in to comment.