From 6d025118478024119da5e229afc5badee18ef0af Mon Sep 17 00:00:00 2001 From: Pramod Mahajan Date: Thu, 29 May 2025 19:55:36 +0530 Subject: [PATCH] Support tag creation on spacebar key --- 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..6430197e 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 === " ")&& input.trim() !== "") { e.preventDefault(); const existing = options.find( (opt) => opt.name.toLowerCase() === input.trim().toLowerCase()