From 1450894266247eb3e25be6137953eb5f1c47b06d Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Wed, 28 Sep 2022 17:42:06 +0200 Subject: [PATCH] refactor(nc-gui): filter attachment and ltar cells from copy --- packages/nc-gui/composables/useMultiSelect/index.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/composables/useMultiSelect/index.ts b/packages/nc-gui/composables/useMultiSelect/index.ts index 0315a57a8c..024e984294 100644 --- a/packages/nc-gui/composables/useMultiSelect/index.ts +++ b/packages/nc-gui/composables/useMultiSelect/index.ts @@ -1,6 +1,6 @@ import type { MaybeRef } from '@vueuse/core' -import { message } from 'ant-design-vue' -import { reactive, unref, useCopy, useEventListener, useI18n } from '#imports' +import { UITypes } from 'nocodb-sdk' +import { message, reactive, unref, useCopy, useEventListener, useI18n } from '#imports' interface SelectedBlock { row: number | null @@ -213,7 +213,11 @@ export function useMultiSelect( cprows.forEach((row) => { cpcols.forEach((col) => { - cptext = `${cptext} ${row.row[col.title]} \t` + // todo: JSON stringify the attachment cell and LTAR contents for copy + // filter attachment cells and LATR cells from copy + if (col.uidt === UITypes.Attachment || col.uidt === UITypes.LinkToAnotherRecord) { + cptext = `${cptext} ${row.row[col.title]} \t` + } }) cptext = `${cptext.trim()}\n`