Skip to content

Commit

Permalink
fixed tag reset in edit modal
Browse files Browse the repository at this point in the history
  • Loading branch information
matej-vavrek committed May 28, 2024
1 parent b412ec3 commit 16a8276
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/components/preview/tags/modal/editTagsModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const EditTagsModal = ({ open, anchorEl, setOpenDialog }) => {
});
setTags([NEW_TAG, ...newTagList].sort(compareTagsAsc));
return () => {
setTag(NEW_TAG);
setTag(null);
setTags([NEW_TAG]);
};
}, [preTagList, tagCategories]);
Expand Down Expand Up @@ -123,7 +123,7 @@ export const EditTagsModal = ({ open, anchorEl, setOpenDialog }) => {
}, [allMolList, tag]);

const resetTagToEditState = () => {
setNewTagCategory(1);
setNewTagCategory(DEFAULT_CATEGORY);
setNewTagColor(DEFAULT_TAG_COLOR);
setNewTagName('');
setNewTagLink('');
Expand Down

0 comments on commit 16a8276

Please sign in to comment.