diff --git a/packages/nc-gui/components/smartsheet/header/CellIcon.ts b/packages/nc-gui/components/smartsheet/header/CellIcon.ts index da3afd5966..9c4da211ce 100644 --- a/packages/nc-gui/components/smartsheet/header/CellIcon.ts +++ b/packages/nc-gui/components/smartsheet/header/CellIcon.ts @@ -103,7 +103,9 @@ export default defineComponent({ setup(props) { const columnMeta = toRef(props, 'columnMeta') - const column = inject(ColumnInj, columnMeta) + const injectedColumn = inject(ColumnInj, columnMeta) + + const column = computed(() => columnMeta.value ?? injectedColumn.value) const { sqlUis } = storeToRefs(useBase()) diff --git a/packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts b/packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts index cfe2347ea0..e7e71286c4 100644 --- a/packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts +++ b/packages/nc-gui/components/smartsheet/header/VirtualCellIcon.ts @@ -78,7 +78,9 @@ export default defineComponent({ setup(props) { const columnMeta = toRef(props, 'columnMeta') - const column = inject(ColumnInj, columnMeta) as Ref + const injectedColumn = inject(ColumnInj, columnMeta) as Ref + + const column = computed(() => columnMeta.value ?? injectedColumn.value) let relationColumn: ColumnType