name und menge werden mit setAttribute gestzt

tötet mich jemand bitte
This commit is contained in:
Technoir committed 2026-10-13 23:09:44 +02:00
1 parent 9ed72aa23e
commit f005069ee2
1 file changed
+2 -2
@@ -53,8 +53,8 @@ export function editItem(shoppingItemElement, formElement, formData) {
let newName = formData.newItemName;
let newAmount = formData.newItemAmount;
shoppingItemElement.querySelector(".item__itemName").textContent = newName;
shoppingItemElement.querySelector(".item__itemAmount").textContent = newAmount;
shoppingItemElement.setAttribute("item-name", newName);
shoppingItemElement.setAttribute("item-amount", newAmount);
formElement.replaceWith(shoppingItemElement);