diff --git a/src/main/resources/static/js/pages/index/frontend/indexUI.js b/src/main/resources/static/js/pages/index/frontend/indexUI.js index af7f11b..2d70e0e 100644 --- a/src/main/resources/static/js/pages/index/frontend/indexUI.js +++ b/src/main/resources/static/js/pages/index/frontend/indexUI.js @@ -37,6 +37,9 @@ export function editList(id, formElement, formData, listLi) { let newName = formData.newListName; + + document.querySelector(`.navbar__list[data-id='${listLi.dataset.id}'] > a`).textContent = newName; + listLi.querySelector(".list__name").textContent = newName; listLi.setAttribute("href", `/list/${id}`); formElement.replaceWith(listLi);