Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
Merge pull request nocodb#6782 from nocodb/nc-fix/hide-col-for-projec…
Browse files Browse the repository at this point in the history
…t-erd

Hide col for project erd
  • Loading branch information
mustafapc19 authored Oct 23, 2023
2 parents 3ee2d57 + fcbf511 commit 8d145e2
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ const isEditBaseModalOpen = computed({
/>
<GeneralModal v-model:visible="isErdModalOpen" size="large">
<div class="h-[80vh]">
<LazyDashboardSettingsErd :source-id="activeBaseId" />
<LazyDashboardSettingsErd :source-id="activeBaseId" :show-all-columns="false" />
</div>
</GeneralModal>
<GeneralModal v-model:visible="isMetaDataModal" size="medium">
Expand Down
3 changes: 2 additions & 1 deletion packages/nc-gui/components/dashboard/settings/Erd.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<script setup lang="ts">
const props = defineProps<{
sourceId: string
showAllColumns?: boolean
}>()
</script>

<template>
<div class="w-full h-full !p-0">
<ErdView :source-id="props.sourceId" />
<ErdView :source-id="props.sourceId" :show-all-columns="props.showAllColumns" />
</div>
</template>
2 changes: 1 addition & 1 deletion packages/nc-gui/components/dlg/ProjectErd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ onMounted(async () => {
<template>
<GeneralModal v-model:visible="isOpen" size="large">
<div class="h-[80vh]">
<ErdView v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" />
<ErdView v-if="!isLoading" :source-id="activeSourceId" :base-id="baseId" :show-all-columns="false" />
</div>
</GeneralModal>
</template>
2 changes: 1 addition & 1 deletion packages/nc-gui/components/smartsheet/details/Erd.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const indicator = h(LoadingOutlined, {
</div>

<Suspense v-else>
<LazyErdView :table="activeTable" :source-id="activeTable?.source_id" :show-all-columns="false" />
<LazyErdView :table="activeTable" :source-id="activeTable?.source_id" show-all-columns />
<template #fallback>
<div class="h-full w-full flex flex-col justify-center items-center mt-28">
<a-spin size="large" :indicator="indicator" />
Expand Down
5 changes: 2 additions & 3 deletions tests/playwright/tests/db/features/erd.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ test.describe('Erd', () => {

const erd = dashboard.details.relations;

await erd.clickShowColumnNames();

if (isPg(context)) {
await erd.verifyNodesCount(sakilaTables.length);
await erd.verifyEdgesCount({
Expand Down Expand Up @@ -181,7 +183,6 @@ test.describe('Erd', () => {
await openErdOfATable('Country');
const erd = dashboard.details.relations;

await erd.clickShowColumnNames();
// Verify tables with default config
await erd.verifyColumns({
tableName: `country`,
Expand Down Expand Up @@ -224,7 +225,6 @@ test.describe('Erd', () => {
// Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country');
await erd.clickShowColumnNames();

await erd.verifyNode({
tableName: `country`,
Expand All @@ -245,7 +245,6 @@ test.describe('Erd', () => {
// Verify
await dashboard.grid.topbar.btn_details.click();
await openErdOfATable('Country');
await erd.clickShowColumnNames();

await erd.verifyNode({
tableName: `country`,
Expand Down

0 comments on commit 8d145e2

Please sign in to comment.