diff --git a/packages/nc-gui/components/virtual-cell/BelongsTo.vue b/packages/nc-gui/components/virtual-cell/BelongsTo.vue index 2347991ec3..aa4b068639 100644 --- a/packages/nc-gui/components/virtual-cell/BelongsTo.vue +++ b/packages/nc-gui/components/virtual-cell/BelongsTo.vue @@ -42,7 +42,7 @@ const listItemsDlg = ref(false) const { state, isNew, removeLTARRef } = useSmartsheetRowStoreOrThrow() -const { loadRelatedTableMeta, relatedTableDisplayValueProp, unlink } = useProvideLTARStore( +const { relatedTableMeta, loadRelatedTableMeta, relatedTableDisplayValueProp, unlink } = useProvideLTARStore( column as Ref>, row, isNew, @@ -78,13 +78,23 @@ useSelectedCellKeyupListener(active, (e: KeyboardEvent) => { break } }) + +const belongsToColumn = computed( + () => + relatedTableMeta.value?.columns?.find((c: any) => c.title === relatedTableDisplayValueProp.value) as ColumnType | undefined, +)