fix: ref type and removed unwanted logic

This commit is contained in:
sreehari jayaraj
2023-09-25 07:07:22 +00:00
parent e85c7ebbc0
commit 6d2e413150
2 changed files with 5 additions and 2 deletions

View File

@@ -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)