Browse Source

fix: belongs-to relation in shared form

pull/8391/head
Pranav C 7 months ago
parent
commit
2e19e4746a
  1. 8
      packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue

8
packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue

@ -174,14 +174,14 @@ const relation = computed(() => {
})
const totalItemsToShow = computed(() => {
if (relation.value === 'bt') {
return row.value.row[relatedTableMeta.value?.title] ? 1 : 0
}
if (isForm.value || isNew.value) {
return rowState.value?.[injectedColumn!.value?.title]?.length ?? 0
}
if (relation.value === 'bt') {
return row.value?.row[relatedTableMeta.value?.title] ? 1 : 0
}
return childrenListCount.value ?? 0
})

Loading…
Cancel
Save