fix: check for single email in TextAreaField (#10149)
Co-authored-by: Dewansh Chaudhari <codewansh@Dewanshs-MacBook-Pro.local> Co-authored-by: sean-brydon <55134778+sean-brydon@users.noreply.github.com> Co-authored-by: Peer Richelsen <peeroke@gmail.com>pull/10201/head^2
parent
07b43e107e
commit
6c058d041a
|
@ -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);
|
||||
}}
|
||||
|
|
Loading…
Reference in New Issue