Support tag creation on spacebar key
This commit is contained in:
parent
5a59e79160
commit
2b65f92f54
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user