Browse Source

refactor(gui): group import and cleanup

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/4514/head
Pranav C 2 years ago
parent
commit
cf46235e54
  1. 19
      packages/nc-gui/composables/useMultiSelect/index.ts

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

@ -4,9 +4,19 @@ import { RelationTypes, UITypes, isVirtualCol } from 'nocodb-sdk'
import type { Cell } from './cellRange' import type { Cell } from './cellRange'
import { CellRange } from './cellRange' import { CellRange } from './cellRange'
import convertCellData from '~/composables/useMultiSelect/convertCellData' import convertCellData from '~/composables/useMultiSelect/convertCellData'
import { useMetas } from '~/composables/useMetas' import {
import { extractPkFromRow, extractSdkResponseErrorMsg } from '~/utils' copyTable,
import { copyTable, message, reactive, ref, unref, useCopy, useEventListener, useI18n } from '#imports' extractPkFromRow,
extractSdkResponseErrorMsg,
message,
reactive,
ref,
unref,
useCopy,
useEventListener,
useI18n,
useMetas,
} from '#imports'
import type { Row } from '~/lib' import type { Row } from '~/lib'
/** /**
@ -272,7 +282,6 @@ export function useMultiSelect(
(relatedTableMeta as any)!.columns!, (relatedTableMeta as any)!.columns!,
) )
// makeEditable(rowObj, columnObj)
return await syncCellData?.({ ...selectedCell, updatedColumnTitle: foreignKeyColumn.title }) return await syncCellData?.({ ...selectedCell, updatedColumnTitle: foreignKeyColumn.title })
} }
@ -281,7 +290,6 @@ export function useMultiSelect(
return message.info(t('msg.info.notSupported')) return message.info(t('msg.info.notSupported'))
} }
// const clipboardText = await getClipboardData()
if (clipboardContext) { if (clipboardContext) {
rowObj.row[columnObj.title!] = convertCellData({ rowObj.row[columnObj.title!] = convertCellData({
value: clipboardContext.value, value: clipboardContext.value,
@ -289,7 +297,6 @@ export function useMultiSelect(
to: columnObj.uidt as UITypes, to: columnObj.uidt as UITypes,
}) })
e.preventDefault() e.preventDefault()
// makeEditable(rowObj, columnObj)
syncCellData?.(selectedCell) syncCellData?.(selectedCell)
} else { } else {
clearCell(selectedCell as { row: number; col: number }, true) clearCell(selectedCell as { row: number; col: number }, true)

Loading…
Cancel
Save