Support tag creation on spacebar key
This commit is contained in:
parent
1f8ba16447
commit
6d02511847
@ -60,7 +60,7 @@ useEffect(() => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleInputKeyDown = (e) => {
|
const handleInputKeyDown = (e) => {
|
||||||
if (e.key === "Enter" && input.trim() !== "") {
|
if ((e.key === "Enter" || e.key === " ")&& input.trim() !== "") {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
const existing = options.find(
|
const existing = options.find(
|
||||||
(opt) => opt.name.toLowerCase() === input.trim().toLowerCase()
|
(opt) => opt.name.toLowerCase() === input.trim().toLowerCase()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user