From 1d20b7ffa89784bef921327774c2a05e3b40219c Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 16 Aug 2022 15:40:37 +0530 Subject: [PATCH] fix(gui-v2): use readonlyInj in linked records list modal Signed-off-by: Pranav C --- .../nc-gui-v2/components/virtual-cell/HasMany.vue | 2 +- .../virtual-cell/components/ListChildItems.vue | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue index d0dfc6189f..f565dec83c 100644 --- a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue @@ -32,7 +32,7 @@ const reloadTrigger = inject(ReloadViewDataHookInj)! const isForm = inject(IsFormInj) -const readonly = inject(ReadonlyInj) +const readonly = inject(ReadonlyInj, false) const listItemsDlg = ref(false) diff --git a/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue index 8fd432bba8..73dc823451 100644 --- a/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue +++ b/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue @@ -3,8 +3,8 @@ import { Empty, Modal } from 'ant-design-vue' import type { ColumnType } from 'nocodb-sdk' import { ColumnInj, - EditModeInj, IsFormInj, + ReadonlyInj, computed, useLTARStoreOrThrow, useSmartsheetRowStoreOrThrow, @@ -24,7 +24,7 @@ const isForm = inject(IsFormInj, ref(false)) const column = inject(ColumnInj) -const editEnabled = inject(EditModeInj) +const readonly = inject(ReadonlyInj, false) const { childrenList, @@ -85,7 +85,7 @@ const expandedFormRow = ref() - +
Link to '{{ meta.title }}' @@ -107,16 +107,17 @@ const expandedFormRow = ref() >
- {{ row[relatedTablePrimaryValueProp] - }}(Primary key : {{ getRelatedTableRowId(row) }}) + {{ row[relatedTablePrimaryValueProp] }} + (Primary key : {{ getRelatedTableRowId(row) }})
-
+