Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion frontend/src/components/Task/TaskFormModal.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,13 @@ import FormError from "../common/FormError";

const toggleTag = (tagName) => {
if (tagName === "Other") {
// toggle showing the custom input
// If "Other" is already in the tags array (added as a custom tag), remove it
if (tags.includes("Other")) {
setTags((prev) => prev.filter((t) => t !== "Other"));
setShowOtherInput(false);
return;
}
// Otherwise toggle showing the custom input
setShowOtherInput((s) => !s);
return;
}
Expand Down
Loading