diff --git a/packages/nc-gui-v2/components/smartsheet/Grid.vue b/packages/nc-gui-v2/components/smartsheet/Grid.vue index bc2918123f..febc2570d6 100644 --- a/packages/nc-gui-v2/components/smartsheet/Grid.vue +++ b/packages/nc-gui-v2/components/smartsheet/Grid.vue @@ -282,6 +282,7 @@ const onNavigate = (dir: NavigateDir) => { :column="columnObj" @navigate="onNavigate" :active="selected.col === colIndex && selected.row === rowIndex" + :row="row" /> -import { computed } from '@vue/reactivity' -import { Row } from 'ant-design-vue' import type { ColumnType } from 'nocodb-sdk' -import { provide, useVirtualCell } from '#imports' -import { ColumnInj, ValueInj, ActiveCellInj, RowInj } from '~/context' +import { provide, toRef, useVirtualCell } from '#imports' +import type { Row } from '~/composables' +import { ActiveCellInj, ColumnInj, RowInj, ValueInj } from '~/context' import { NavigateDir } from '~/lib' interface Props { column: ColumnType modelValue: any - row: Record + row: Row active?: boolean } const props = defineProps() const emit = defineEmits(['update:modelValue', 'navigate']) - -const { column, modelValue: value, row } = props +const { column, modelValue: value } = props const active = toRef(props, 'active', false) - +const row = toRef(props, 'row') provide(ColumnInj, column) provide(ValueInj, value) provide(ActiveCellInj, active) provide(RowInj, row) -provide('value', value) +provide(ValueInj, value) const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualCell(column) diff --git a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue index 4e1ac0cc1d..2d8e72fbce 100644 --- a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue @@ -1,8 +1,12 @@