|
|
|
@ -132,12 +132,15 @@ onKeyStroke('Backspace', () => {
|
|
|
|
|
// when bulk email is pasted |
|
|
|
|
const onPaste = (e: ClipboardEvent) => { |
|
|
|
|
const pastedText = e.clipboardData?.getData('text') |
|
|
|
|
const inputArray = pastedText?.split(',') || pastedText?.split(' ') || pastedText?.split('') |
|
|
|
|
|
|
|
|
|
const inputArray = pastedText?.split(',') || pastedText?.split(' ') |
|
|
|
|
|
|
|
|
|
// if data is pasted to a already existing text in input |
|
|
|
|
// we add existingInput + pasted data |
|
|
|
|
if (inputArray?.length === 1 && inviteData.email.length) { |
|
|
|
|
inputArray[0] = inviteData.email += inputArray[0] |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
inputArray?.forEach((el) => { |
|
|
|
|
const isEmailIsValid = emailInputValidation(el) |
|
|
|
|
|
|
|
|
|