Browse Source

remove filter from useProject and added to openQuickImportDialog

pull/5159/head
Semjon Geist 2 years ago
parent
commit
c65f5bbe9f
  1. 2
      packages/nc-gui/composables/useProject.ts
  2. 3
      packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue

2
packages/nc-gui/composables/useProject.ts

@ -35,7 +35,7 @@ export const useProject = createSharedComposable(() => {
const project = ref<ProjectType>({}) const project = ref<ProjectType>({})
const bases = computed<BaseType[]>(() => project.value?.bases?.filter((base: BaseType) => base.enabled) || []) const bases = computed<BaseType[]>(() => project.value?.bases || [])
const tables = ref<TableType[]>([]) const tables = ref<TableType[]>([])

3
packages/nc-gui/pages/[projectType]/[projectId]/index/index/index.vue

@ -12,6 +12,7 @@ import {
useUIPermission, useUIPermission,
watch, watch,
} from '#imports' } from '#imports'
import {BaseType} from "nocodb-sdk";
const dropZone = ref<HTMLDivElement>() const dropZone = ref<HTMLDivElement>()
@ -129,7 +130,7 @@ function openCreateTable() {
const { close } = useDialog(resolveComponent('DlgTableCreate'), { const { close } = useDialog(resolveComponent('DlgTableCreate'), {
'modelValue': isOpen, 'modelValue': isOpen,
'onUpdate:modelValue': closeDialog, 'onUpdate:modelValue': closeDialog,
'baseId': bases.value[0].id, 'baseId': bases.value?.filter((base: BaseType) => base.enabled)[0].id,
}) })
function closeDialog() { function closeDialog() {

Loading…
Cancel
Save