mirror of
https://github.com/nocodb/nocodb.git
synced 2026-05-01 12:46:57 +00:00
Nc fix(nc-gui): allow copy paste email id from gmail in team & settings, for example, abc <abc@gmail.com> (#7963)
* fix(nc-gui): allow copy paste email id from gmail * fix(nc-gui): skip display error & add only valid emails if user copy paste bulk emails in team & settings invite input element * fix(nc-gui): add a comment explaining the regex pattern for email validate/extract * fix(nc-gui): allow copy paste emailid from gmail in team & settings oss * fix(nc-gui): add support to extract email from pasted string in email cell if accept only email is true
This commit is contained in:
@@ -3,6 +3,7 @@ import type { AttachmentType, ColumnType, LinkToAnotherRecordType, SelectOptions
|
||||
import { UITypes, getDateFormat, getDateTimeFormat, populateUniqueFileName } from 'nocodb-sdk'
|
||||
import type { AppInfo } from '~/composables/useGlobal'
|
||||
import { isBt, isMm, isOo, parseProp } from '#imports'
|
||||
import { extractEmail } from '~/helpers/parsers/parserHelpers'
|
||||
|
||||
export default function convertCellData(
|
||||
args: { to: UITypes; value: string; column: ColumnType; appInfo: AppInfo; files?: FileList | File[]; oldValue?: unknown },
|
||||
@@ -291,6 +292,12 @@ export default function convertCellData(
|
||||
throw new Error(`Unsupported conversion for ${to}`)
|
||||
}
|
||||
}
|
||||
case UITypes.Email: {
|
||||
if (parseProp(column.meta).validate) {
|
||||
return extractEmail(value) || value
|
||||
}
|
||||
return value
|
||||
}
|
||||
case UITypes.Lookup:
|
||||
case UITypes.Rollup:
|
||||
case UITypes.Formula:
|
||||
|
||||
Reference in New Issue
Block a user