From 35ca496166733880062a4de2c3a659e26dfa55ad Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Mon, 26 May 2025 13:33:18 +0530 Subject: [PATCH] added support for creating tags with space or enter keys --- src/components/common/TagInput.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/TagInput.jsx b/src/components/common/TagInput.jsx index c40a278f..4cadf8be 100644 --- a/src/components/common/TagInput.jsx +++ b/src/components/common/TagInput.jsx @@ -60,7 +60,7 @@ useEffect(() => { }; const handleInputKeyDown = (e) => { - if (e.key === "Enter" && input.trim() !== "") { + if ((e.key === "Enter" || e.key === " ") || trimmedInput !== "") { e.preventDefault(); const existing = options.find( (opt) => opt.name.toLowerCase() === input.trim().toLowerCase()