fix: undo redo mm cell copy paste

This commit is contained in:
Ramesh Mane
2024-02-19 03:41:22 +00:00
parent 6b9ea2aba4
commit 4434da23e9
11 changed files with 257 additions and 141 deletions

View File

@@ -1,8 +1,8 @@
import dayjs from 'dayjs'
import type { ColumnType, LinkToAnotherRecordType, SelectOptionsType } from 'nocodb-sdk'
import { RelationTypes, UITypes } from 'nocodb-sdk'
import { UITypes } from 'nocodb-sdk'
import type { AppInfo } from '~/composables/useGlobal'
import { parseProp } from '#imports'
import { isBt, isMm, parseProp } from '#imports'
export default function convertCellData(
args: { to: UITypes; value: string; column: ColumnType; appInfo: AppInfo; files?: FileList | File[]; oldValue?: unknown },
@@ -254,7 +254,7 @@ export default function convertCellData(
return undefined
}
if ((column.colOptions as LinkToAnotherRecordType)?.type === RelationTypes.BELONGS_TO) {
if (isBt(column)) {
const parsedVal = typeof value === 'string' ? JSON.parse(value) : value
if (
@@ -274,7 +274,7 @@ export default function convertCellData(
return undefined
}
if ((column.colOptions as LinkToAnotherRecordType)?.type === RelationTypes.MANY_TO_MANY) {
if (isMm(column)) {
const parsedVal = typeof value === 'string' ? JSON.parse(value) : value
if (