Support tag creation on spacebar key

This commit is contained in:
Pramod Mahajan 2025-05-29 19:55:36 +05:30
parent 5a59e79160
commit 2b65f92f54

View File

@ -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()