Browse Source

refactor(gui): remove unused import and specify types

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/5063/head
Pranav C 2 years ago
parent
commit
3f7c3338b5
  1. 5
      packages/nc-gui/components/virtual-cell/Lookup.vue

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

@ -6,7 +6,6 @@ import {
CellValueInj, CellValueInj,
ColumnInj, ColumnInj,
MetaInj, MetaInj,
ReadonlyInj,
computed, computed,
inject, inject,
isAttachment, isAttachment,
@ -27,7 +26,7 @@ const cellValue = inject(CellValueInj, ref())
const relationColumn = computed( const relationColumn = computed(
() => () =>
meta.value?.columns?.find((c) => c.id === (column.value?.colOptions as LookupType)?.fk_relation_column_id) as meta.value?.columns?.find((c: ColumnType) => c.id === (column.value?.colOptions as LookupType)?.fk_relation_column_id) as
| (ColumnType & { | (ColumnType & {
colOptions: LinkToAnotherRecordType | undefined colOptions: LinkToAnotherRecordType | undefined
}) })
@ -36,7 +35,7 @@ const relationColumn = computed(
watch( watch(
relationColumn, relationColumn,
async (relationCol) => { async (relationCol: { colOptions: LinkToAnotherRecordType }) => {
if (relationCol && relationCol.colOptions) await getMeta(relationCol.colOptions.fk_related_model_id!) if (relationCol && relationCol.colOptions) await getMeta(relationCol.colOptions.fk_related_model_id!)
}, },
{ immediate: true }, { immediate: true },

Loading…
Cancel
Save