From f5f1ba5a978eb7e44523f9965404f31ec3df5ffe Mon Sep 17 00:00:00 2001 From: braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Mon, 17 Oct 2022 12:48:41 +0200 Subject: [PATCH] fix(nc-gui): remove node border if no columns exist --- packages/nc-gui/components/erd/TableNode.vue | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/nc-gui/components/erd/TableNode.vue b/packages/nc-gui/components/erd/TableNode.vue index 067719679b..99b08acbcd 100644 --- a/packages/nc-gui/components/erd/TableNode.vue +++ b/packages/nc-gui/components/erd/TableNode.vue @@ -3,7 +3,7 @@ import type { NodeProps } from '@vue-flow/core' import { Handle, Position } from '@vue-flow/core' import type { ColumnType, LinkToAnotherRecordType, TableType } from 'nocodb-sdk' import { UITypes, isVirtualCol } from 'nocodb-sdk' -import { MetaInj, provide, toRef, useNuxtApp } from '#imports' +import { MetaInj, computed, provide, toRef, useNuxtApp } from '#imports' interface NodeData { table: TableType @@ -29,6 +29,8 @@ const { $e } = useNuxtApp() const relatedColumnId = (colOptions: LinkToAnotherRecordType | any) => colOptions.type === 'mm' ? colOptions.fk_parent_column_id : colOptions.fk_child_column_id + +const hasColumns = computed(() => data.pkAndFkColumns.length || data.nonPkColumns.length)