From adb10581a5468e04d2f24077003d7c2f1c117808 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 16 Aug 2022 12:50:34 +0530 Subject: [PATCH] fix(gui-v2): use ReadonlyInj in LTAR since editEnabled is not the right one Signed-off-by: Pranav C --- packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue | 6 +++--- packages/nc-gui-v2/components/virtual-cell/HasMany.vue | 6 +++--- packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue | 6 +++--- .../components/virtual-cell/components/ItemChip.vue | 8 ++++---- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue b/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue index 0967f6886a..7fea01946c 100644 --- a/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue +++ b/packages/nc-gui-v2/components/virtual-cell/BelongsTo.vue @@ -5,7 +5,7 @@ import { ActiveCellInj, CellValueInj, ColumnInj, - EditModeInj, + ReadonlyInj, ReloadViewDataHookInj, RowInj, defineAsyncComponent, @@ -31,7 +31,7 @@ const row = inject(RowInj)! const active = inject(ActiveCellInj)! -const editEnabled = inject(EditModeInj) +const readonly = inject(ReadonlyInj, false) const listItemsDlg = ref(false) @@ -72,7 +72,7 @@ const unlinkRef = async (rec: Record) => { -
+
) => { @click="childListDlg = true" /> diff --git a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue index 12a4290210..ef274f5e62 100644 --- a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue @@ -4,8 +4,8 @@ import type { Ref } from 'vue' import { CellValueInj, ColumnInj, - EditModeInj, IsFormInj, + ReadonlyInj, ReloadViewDataHookInj, RowInj, computed, @@ -31,7 +31,7 @@ const reloadTrigger = inject(ReloadViewDataHookInj)! const isForm = inject(IsFormInj) -const editEnabled = inject(EditModeInj) +const readonly = inject(ReadonlyInj, false) const listItemsDlg = ref(false) @@ -92,7 +92,7 @@ const unlinkRef = async (rec: Record) => { diff --git a/packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue b/packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue index 48d79a6f8a..1e37ea6dd2 100644 --- a/packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue +++ b/packages/nc-gui-v2/components/virtual-cell/components/ItemChip.vue @@ -1,5 +1,5 @@