From f3d4b45d00b95c050a647ad4084b7af4b29f27d1 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 31 Aug 2022 14:37:22 +0530 Subject: [PATCH] fix(gui-v2): show expand icon in cell Signed-off-by: Pranav C --- .../components/virtual-cell/ManyToMany.vue | 4 +- .../nc-gui-v2/composables/useLTARStore.ts | 40 +++++++++++++------ 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue index cbc9bdd0ae..47febc5caa 100644 --- a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue @@ -94,14 +94,14 @@ const unlinkRef = async (rec: Record) => { -
+
diff --git a/packages/nc-gui-v2/composables/useLTARStore.ts b/packages/nc-gui-v2/composables/useLTARStore.ts index 81f92b0a4d..fe3791f736 100644 --- a/packages/nc-gui-v2/composables/useLTARStore.ts +++ b/packages/nc-gui-v2/composables/useLTARStore.ts @@ -150,19 +150,33 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState( try { if (colOptions.type === 'bt') return - childrenList.value = await $api.dbTableRow.nestedList( - NOCO, - (project?.value?.id || sharedView?.value?.view?.project_id) as string, - meta.value.id, - rowId.value, - colOptions.type as 'mm' | 'hm', - encodeURIComponent(column?.value?.title), - { - limit: String(childrenListPagination.size), - offset: String(childrenListPagination.size * (childrenListPagination.page - 1)), - where: childrenListPagination.query && `(${relatedTablePrimaryValueProp.value},like,${childrenListPagination.query})`, - } as any, - ) + if (isPublic) { + childrenList.value = await $api.public.dataNestedList( + sharedView.value?.uuid as string, + rowId.value, + colOptions.type as 'mm' | 'hm', + encodeURIComponent(column?.value?.id), + { + limit: String(childrenListPagination.size), + offset: String(childrenListPagination.size * (childrenListPagination.page - 1)), + where: childrenListPagination.query && `(${relatedTablePrimaryValueProp.value},like,${childrenListPagination.query})`, + } as any, + ) + }else{ + childrenList.value = await $api.dbTableRow.nestedList( + NOCO, + (project?.value?.id || sharedView?.value?.view?.project_id) as string, + meta.value.id, + rowId.value, + colOptions.type as 'mm' | 'hm', + encodeURIComponent(column?.value?.title), + { + limit: String(childrenListPagination.size), + offset: String(childrenListPagination.size * (childrenListPagination.page - 1)), + where: childrenListPagination.query && `(${relatedTablePrimaryValueProp.value},like,${childrenListPagination.query})`, + } as any, + ) + } } catch (e: any) { message.error(`Failed to load children list: ${await extractSdkResponseErrorMsg(e)}`) }