Browse Source

fix: Fixed non string value copy of cells

pull/6922/head
Muhammed Mustafa 10 months ago
parent
commit
6c950a6be5
  1. 7
      packages/nc-gui/composables/useMultiSelect/index.ts

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

@ -108,15 +108,16 @@ export function useMultiSelect(
}
const valueToCopy = (rowObj: Row, columnObj: ColumnType) => {
const valueToCopy = columnObj.title && rowObj.row[columnObj.title]
let textToCopy: string = String(columnObj.title && rowObj.row[columnObj.title]) || ''
let textToCopy = (columnObj.title && rowObj.row[columnObj.title]) || ''
if (columnObj.uidt === UITypes.Checkbox) {
textToCopy = String(!!valueToCopy)
textToCopy = !!textToCopy
}
if (typeof textToCopy === 'object') {
textToCopy = JSON.stringify(textToCopy)
} else {
textToCopy = textToCopy.toString()
}
if (columnObj.uidt === UITypes.Formula) {

Loading…
Cancel
Save