added lowercase text onchange
This commit is contained in:
1 parent
dacf729bca
commit
3a99250508
5 files changed
+19
-11
No files matched your search
@@ -107,12 +107,13 @@ const TeamPanel = () => {
|
||||
|
||||
const handleChange = (event) => {
|
||||
const { value } = event.target;
|
||||
const newEmail = value?.toLowerCase() || value
|
||||
setToInvite((prev) => ({
|
||||
...prev,
|
||||
email: value,
|
||||
email: newEmail,
|
||||
}));
|
||||
|
||||
const validation = credentials.validate({ email: value }, { abortEarly: false });
|
||||
const validation = credentials.validate({ email: newEmail }, { abortEarly: false });
|
||||
|
||||
setErrors((prev) => {
|
||||
const updatedErrors = { ...prev };
|
||||
@@ -153,7 +154,7 @@ const TeamPanel = () => {
|
||||
|
||||
try {
|
||||
await networkService.sendInvitationToken({
|
||||
email: toInvite.email.toLowerCase(),
|
||||
email: toInvite.email,
|
||||
role: toInvite.role,
|
||||
});
|
||||
closeInviteModal();
|
||||
|
||||
Reference in new issue
Block a user