mirror of
https://github.com/nocodb/nocodb.git
synced 2026-04-29 21:56:42 +00:00
fix: convert empty string to null on paste
Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
@@ -13,6 +13,9 @@ export default function convertCellData(
|
||||
|
||||
const dateFormat = isMysql ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ'
|
||||
|
||||
// return null if value is empty
|
||||
if (value === '') return null
|
||||
|
||||
switch (to) {
|
||||
case UITypes.Number: {
|
||||
const parsedNumber = Number(value)
|
||||
@@ -43,7 +46,7 @@ export default function convertCellData(
|
||||
if (strval === 'true' || strval === '1') return true
|
||||
if (strval === 'false' || strval === '0' || strval === '') return false
|
||||
}
|
||||
return Boolean(value)
|
||||
return null
|
||||
case UITypes.Date: {
|
||||
const parsedDate = dayjs(value)
|
||||
if (!parsedDate.isValid()) {
|
||||
|
||||
Reference in New Issue
Block a user