fix: check for single email in TextAreaField (#10149)
Co-authored-by: Dewansh Chaudhari <[email protected]> Co-authored-by: sean-brydon <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
2 files changed
+10
-4
No files matched your search
@@ -76,7 +76,11 @@ export const AddNewOrgAdminsForm = () => {
|
||||
required
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
const emails = e.target.value.split(",").map((email) => email.trim().toLocaleLowerCase());
|
||||
const targetValues = e.target.value.split(",");
|
||||
const emails =
|
||||
targetValues.length === 1
|
||||
? targetValues[0].trim().toLocaleLowerCase()
|
||||
: targetValues.map((email) => email.trim().toLocaleLowerCase());
|
||||
|
||||
return onChange(emails);
|
||||
}}
|
||||
|
||||
@@ -236,9 +236,11 @@ export default function MemberInvitationModal(props: MemberInvitationModalProps)
|
||||
required
|
||||
value={value}
|
||||
onChange={(e) => {
|
||||
const emails = e.target.value
|
||||
.split(",")
|
||||
.map((email) => email.trim().toLocaleLowerCase());
|
||||
const targetValues = e.target.value.split(",");
|
||||
const emails =
|
||||
targetValues.length === 1
|
||||
? targetValues[0].trim().toLocaleLowerCase()
|
||||
: targetValues.map((email) => email.trim().toLocaleLowerCase());
|
||||
|
||||
return onChange(emails);
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user