Browse Source

fix(nc-gui): belongsTo cell copy paste issue

pull/7558/head
Ramesh Mane 10 months ago
parent
commit
87049413f0
  1. 1
      packages/nc-gui/composables/useMultiSelect/convertCellData.ts
  2. 7
      packages/nc-gui/composables/useMultiSelect/index.ts

1
packages/nc-gui/composables/useMultiSelect/convertCellData.ts

@ -246,7 +246,6 @@ export default function convertCellData(
return parsedVal || value return parsedVal || value
} }
case UITypes.LinkToAnotherRecord:
case UITypes.Lookup: case UITypes.Lookup:
case UITypes.Rollup: case UITypes.Rollup:
case UITypes.Formula: case UITypes.Formula:

7
packages/nc-gui/composables/useMultiSelect/index.ts

@ -852,8 +852,7 @@ export function useMultiSelect(
(columnObj.colOptions as LinkToAnotherRecordType)?.type === RelationTypes.BELONGS_TO (columnObj.colOptions as LinkToAnotherRecordType)?.type === RelationTypes.BELONGS_TO
) { ) {
const clipboardContext = JSON.parse(clipboardData!) const clipboardContext = JSON.parse(clipboardData!)
let pasteVal = convertCellData(
rowObj.row[columnObj.title!] = convertCellData(
{ {
value: clipboardContext, value: clipboardContext,
to: columnObj.uidt as UITypes, to: columnObj.uidt as UITypes,
@ -863,6 +862,10 @@ export function useMultiSelect(
isMysql(meta.value?.source_id), isMysql(meta.value?.source_id),
) )
if (pasteVal === undefined) return
rowObj.row[columnObj.title!] = pasteVal
const foreignKeyColumn = meta.value?.columns?.find( const foreignKeyColumn = meta.value?.columns?.find(
(column: ColumnType) => column.id === (columnObj.colOptions as LinkToAnotherRecordType)?.fk_child_column_id, (column: ColumnType) => column.id === (columnObj.colOptions as LinkToAnotherRecordType)?.fk_child_column_id,
) )

Loading…
Cancel
Save