Browse Source

refactor: use variables to improve readability

pull/8399/head
Pranav C 8 months ago
parent
commit
03c1e429aa
  1. 6
      packages/nc-gui/components/virtual-cell/OneToOne.vue

6
packages/nc-gui/components/virtual-cell/OneToOne.vue

@ -55,9 +55,9 @@ const value = computed(() => {
if (cellValue?.value) {
return cellValue?.value
} else if (isNew.value) {
return Array.isArray(state?.value?.[column?.value.title as string])
? state?.value?.[column?.value.title as string][0]
: state?.value?.[column?.value.title as string]
const columnTitle = column?.value.title as string
const columnValue = state?.value?.[columnTitle]
return Array.isArray(columnValue) ? columnValue[0] : columnValue
}
return null
})

Loading…
Cancel
Save