From c65f5bbe9f84cb247859a99a96844f1942deddde Mon Sep 17 00:00:00 2001 From: Semjon Geist Date: Mon, 20 Feb 2023 15:29:22 +0100 Subject: [PATCH] remove filter from useProject and added to openQuickImportDialog --- packages/nc-gui/composables/useProject.ts | 2 +- .../pages/[projectType]/[projectId]/index/index/index.vue | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/nc-gui/composables/useProject.ts b/packages/nc-gui/composables/useProject.ts index 2ddd8176bd..f0c1109385 100644 --- a/packages/nc-gui/composables/useProject.ts +++ b/packages/nc-gui/composables/useProject.ts @@ -35,7 +35,7 @@ export const useProject = createSharedComposable(() => { const project = ref({}) - const bases = computed(() => project.value?.bases?.filter((base: BaseType) => base.enabled) || []) + const bases = computed(() => project.value?.bases || []) const tables = ref([]) diff --git a/packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue b/packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue index c973b2fb5a..7ae36ab118 100644 --- a/packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue +++ b/packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue @@ -12,6 +12,7 @@ import { useUIPermission, watch, } from '#imports' +import {BaseType} from "nocodb-sdk"; const dropZone = ref() @@ -129,7 +130,7 @@ function openCreateTable() { const { close } = useDialog(resolveComponent('DlgTableCreate'), { 'modelValue': isOpen, 'onUpdate:modelValue': closeDialog, - 'baseId': bases.value[0].id, + 'baseId': bases.value?.filter((base: BaseType) => base.enabled)[0].id, }) function closeDialog() {