mirror of
https://github.com/cse110-fa22-group29/cse110-fa22-group29.git
synced 2024-11-10 05:34:44 +00:00
fix create page tag duplicate
This commit is contained in:
parent
9bc5b5624b
commit
23bf3a2c84
@ -97,10 +97,10 @@ function initFormHandler() {
|
|||||||
let tagLabel = document.createElement("label");
|
let tagLabel = document.createElement("label");
|
||||||
tagLabel.innerHTML = tagField.value;
|
tagLabel.innerHTML = tagField.value;
|
||||||
tagLabel.setAttribute("class","tag");
|
tagLabel.setAttribute("class","tag");
|
||||||
tagSet.add(tagField.value.toLowerCase());
|
tagSet.add(tagSetVal);
|
||||||
tagLabel.addEventListener("click",()=> {
|
tagLabel.addEventListener("click",()=> {
|
||||||
tagContainer.removeChild(tagLabel);
|
tagContainer.removeChild(tagLabel);
|
||||||
tagSet.delete(tagField.value.toLowerCase());
|
tagSet.delete(tagSetVal);
|
||||||
});
|
});
|
||||||
|
|
||||||
tagContainer.append(tagLabel);
|
tagContainer.append(tagLabel);
|
||||||
|
Loading…
Reference in New Issue
Block a user