mirror of
https://github.com/moghtech/komodo.git
synced 2026-09-08 16:01:18 +00:00
clear input when opening tags dropdown
This commit is contained in:
@@ -57,6 +57,10 @@ export const ManageTags = ({ target }: { target: TargetExcludingSystem }) => {
|
||||
if (resource && !tags) setTags(resource.tags);
|
||||
}, [resource, tags]);
|
||||
|
||||
useEffect(() => {
|
||||
if (open) setInput("");
|
||||
}, [open]);
|
||||
|
||||
const update_tags = (tag: Types.CustomTag) => {
|
||||
const exists = tags?.some((id) => id === tag._id?.$oid);
|
||||
if (exists) return setTags((t) => t?.filter((id) => id !== tag._id?.$oid));
|
||||
|
||||
Reference in New Issue
Block a user