From ad19f4deb01265d740bb6c68a8aa402f387cd3f6 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Fri, 5 Aug 2022 16:35:04 +0530 Subject: [PATCH] refactor(gui-v2): update injection key name Signed-off-by: Pranav C --- .../nc-gui-v2/components/smartsheet/VirtualCell.vue | 6 +++--- .../nc-gui-v2/components/virtual-cell/BelongsTo.vue | 10 +++++----- .../nc-gui-v2/components/virtual-cell/Formula.vue | 4 ++-- .../nc-gui-v2/components/virtual-cell/HasMany.vue | 12 ++++++------ .../nc-gui-v2/components/virtual-cell/Lookup.vue | 4 ++-- .../nc-gui-v2/components/virtual-cell/ManyToMany.vue | 12 ++++++------ .../nc-gui-v2/components/virtual-cell/Rollup.vue | 4 ++-- .../components/virtual-cell/components/ItemChip.vue | 1 - .../components/virtual-cell/components/ListItems.vue | 3 +-- packages/nc-gui-v2/context/index.ts | 2 +- 10 files changed, 28 insertions(+), 30 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet/VirtualCell.vue b/packages/nc-gui-v2/components/smartsheet/VirtualCell.vue index 499cee5bbe..b385f6aca8 100644 --- a/packages/nc-gui-v2/components/smartsheet/VirtualCell.vue +++ b/packages/nc-gui-v2/components/smartsheet/VirtualCell.vue @@ -2,7 +2,7 @@ import type { ColumnType } from 'nocodb-sdk' import { provide, toRef, useVirtualCell } from '#imports' import type { Row } from '~/composables' -import { ActiveCellInj, ColumnInj, RowInj, ValueInj } from '~/context' +import { ActiveCellInj, CellValueInj, ColumnInj, RowInj } from '~/context' import { NavigateDir } from '~/lib' interface Props { @@ -19,10 +19,10 @@ const active = toRef(props, 'active', false) const row = toRef(props, 'row') provide(ColumnInj, column) -provide(ValueInj, value) +provide(CellValueInj, value) provide(ActiveCellInj, active) provide(RowInj, row) -provide(ValueInj, toRef(props, 'modelValue')) +provide(CellValueInj, toRef(props, 'modelValue')) const { isLookup, isBt, isRollup, isMm, isHm, isFormula, isCount } = useVirtualCell(column) diff --git a/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue b/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue index 4e2e99f5bb..1e417e3caf 100644 --- a/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue +++ b/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue @@ -3,12 +3,12 @@ import type { ColumnType } from 'nocodb-sdk' import ItemChip from './components/ItemChip.vue' import ListItems from './components/ListItems.vue' import { useProvideLTARStore } from '#imports' -import { ColumnInj, ReloadViewDataHookInj, RowInj, ValueInj } from '~/context' +import { CellValueInj, ColumnInj, ReloadViewDataHookInj, RowInj } from '~/context' import MdiExpandIcon from '~icons/mdi/arrow-expand' const column = inject(ColumnInj) const reloadTrigger = inject(ReloadViewDataHookInj) -const value = inject(ValueInj) +const cellValue = inject(CellValueInj) const row = inject(RowInj) const active = false const localState = null @@ -25,13 +25,13 @@ await loadRelatedTableMeta()