Browse Source

fix: update value without making editable

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

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

@ -258,7 +258,7 @@ export function useMultiSelect(
if (rowObj.row[columnObj.title!]) { if (rowObj.row[columnObj.title!]) {
clipboardContext = { clipboardContext = {
value: rowObj.row[columnObj.title!], value: rowObj.row[columnObj.title!],
uidt: columnObj.uidt, uidt: columnObj.uidt as UITypes,
} }
} else { } else {
clipboardContext = null clipboardContext = null
@ -266,14 +266,15 @@ export function useMultiSelect(
await copyValue() await copyValue()
break break
case 86: case 86:
// const clipboardText = await getClipboardData()
if (clipboardContext) { if (clipboardContext) {
rowObj.row[columnObj.title!] = convertCellData({ rowObj.row[columnObj.title!] = convertCellData({
value: clipboardContext.value, value: clipboardContext.value,
from: clipboardContext.uidt, from: clipboardContext.uidt,
to: columnObj.uidt, to: columnObj.uidt as UITypes,
}) })
e.preventDefault() e.preventDefault()
makeEditable(rowObj, columnObj) // 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