From 2e19e4746af42d0c460a311e1f0e2f194cb60871 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Sat, 4 May 2024 09:46:36 +0000 Subject: [PATCH] fix: belongs-to relation in shared form --- .../components/virtual-cell/components/UnLinkedItems.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue b/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue index b0f62408ef..c93597ff24 100644 --- a/packages/nc-gui/components/virtual-cell/components/UnLinkedItems.vue +++ b/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 })