From b0b32dd4a4bf67b2114d133929504d56f4148ea3 Mon Sep 17 00:00:00 2001 From: mertmit Date: Thu, 24 Nov 2022 16:15:03 +0300 Subject: [PATCH] fix: cellIcon for multiple source Signed-off-by: mertmit --- packages/nc-gui/components/smartsheet/Cell.vue | 4 +++- packages/nc-gui/components/smartsheet/header/CellIcon.ts | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Cell.vue b/packages/nc-gui/components/smartsheet/Cell.vue index 753b92c374..a64d08d1b4 100644 --- a/packages/nc-gui/components/smartsheet/Cell.vue +++ b/packages/nc-gui/components/smartsheet/Cell.vue @@ -82,7 +82,9 @@ const isLocked = inject(IsLockedInj, ref(false)) const { currentRow } = useSmartsheetRowStoreOrThrow() -const { sqlUi } = useProject() +const { sqlUis } = useProject() + +const sqlUi = ref(column.value?.base_id ? sqlUis.value[column.value?.base_id] : Object.values(sqlUis.value)[0]) const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value)) diff --git a/packages/nc-gui/components/smartsheet/header/CellIcon.ts b/packages/nc-gui/components/smartsheet/header/CellIcon.ts index d550bdf77c..8e5b74035b 100644 --- a/packages/nc-gui/components/smartsheet/header/CellIcon.ts +++ b/packages/nc-gui/components/smartsheet/header/CellIcon.ts @@ -118,7 +118,9 @@ export default defineComponent({ const column = inject(ColumnInj, columnMeta) - const { sqlUi } = useProject() + const { sqlUis } = useProject() + + const sqlUi = ref(columnMeta.value?.base_id ? sqlUis.value[columnMeta.value?.base_id] : Object.values(sqlUis.value)[0]) const abstractType = computed(() => column.value && sqlUi.value.getAbstractType(column.value))