Browse Source

fix: Extract relation column from useMetas composable (#8492)

* fix: extract relation column from useMetas composable data

* Update packages/nc-gui/components/virtual-cell/Lookup.vue

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>

---------

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
pull/8511/head
Pranav C 6 months ago committed by GitHub
parent
commit
bccf60644d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 11
      packages/nc-gui/components/virtual-cell/Lookup.vue

11
packages/nc-gui/components/virtual-cell/Lookup.vue

@ -22,7 +22,16 @@ provide(RowHeightInj, providedHeightRef)
const relationColumn = computed(
() =>
meta.value?.columns?.find((c: ColumnType) => c.id === (column.value?.colOptions as LookupType)?.fk_relation_column_id) as
const relationColumn = computed(
() =>
meta.value?.id ? metas.value[meta.value?.id]?.columns?.find(
(c: ColumnType) => c.id === (column.value?.colOptions as LookupType)?.fk_relation_column_id,
) : undefined as
| (ColumnType & {
colOptions: LinkToAnotherRecordType | undefined
})
| undefined,
)
| (ColumnType & {
colOptions: LinkToAnotherRecordType | undefined
})

Loading…
Cancel
Save