chore: Invite user to org form input tab issue (#7603)

Fixes: #6785
This commit is contained in:
balajisoundar 2021-09-20 12:19:50 +05:30 committed by GitHub
parent 5e88255feb
commit 4288b44f2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -104,12 +104,14 @@ function TagInputComponent(props: TagInputProps) {
};
const onKeyDown = (e: any) => {
// Add new values to the tags on comma, return key, space and Tab press.
// Add new values to the tags on comma, return key, space and Tab press
// only if user has typed something on input
if (
e.key === "," ||
e.key === "Enter" ||
e.key === " " ||
e.key === "Tab"
(e.key === "," ||
e.key === "Enter" ||
e.key === " " ||
e.key === "Tab") &&
e.target.value
) {
const newValues = [...values, e.target.value];
commitValues(newValues);