Browse Source

fix(gui): convert checkbox value to true/false while copying

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

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

@ -74,6 +74,11 @@ export function useMultiSelect(
const columnObj = unref(fields)[cpCol] const columnObj = unref(fields)[cpCol]
let textToCopy = (columnObj.title && rowObj.row[columnObj.title]) || '' let textToCopy = (columnObj.title && rowObj.row[columnObj.title]) || ''
if (columnObj.uidt === UITypes.Checkbox) {
textToCopy = !!textToCopy
}
if (typeof textToCopy === 'object') { if (typeof textToCopy === 'object') {
textToCopy = JSON.stringify(textToCopy) textToCopy = JSON.stringify(textToCopy)
} }
@ -236,8 +241,7 @@ export function useMultiSelect(
editEnabled.value = false editEnabled.value = false
} }
break break
default: default: {
{
const rowObj = unref(data)[selectedCell.row] const rowObj = unref(data)[selectedCell.row]
const columnObj = unref(fields)[selectedCell.col] const columnObj = unref(fields)[selectedCell.col]

Loading…
Cancel
Save