diff --git a/packages/nc-gui/components/dashboard/TreeView.vue b/packages/nc-gui/components/dashboard/TreeView.vue
index c21c60e146..7e29aad957 100644
--- a/packages/nc-gui/components/dashboard/TreeView.vue
+++ b/packages/nc-gui/components/dashboard/TreeView.vue
@@ -145,7 +145,7 @@ const addTableTab = (table: TableType) => {
addTab({ title: table.title, id: table.id, type: table.type as TabType })
}
-function openRenameTableDialog(table: TableType, baseId: string, rightClick = false) {
+function openRenameTableDialog(table: TableType, baseId?: string, rightClick = false) {
$e(rightClick ? 'c:table:rename:navdraw:right-click' : 'c:table:rename:navdraw:options')
const isOpen = ref(true)
@@ -153,7 +153,7 @@ function openRenameTableDialog(table: TableType, baseId: string, rightClick = fa
const { close } = useDialog(resolveComponent('DlgTableRename'), {
'modelValue': isOpen,
'tableMeta': table,
- 'baseId': baseId,
+ 'baseId': baseId || bases.value[0].id,
'onUpdate:modelValue': closeDialog,
})
@@ -164,7 +164,7 @@ function openRenameTableDialog(table: TableType, baseId: string, rightClick = fa
}
}
-function openQuickImportDialog(type: string) {
+function openQuickImportDialog(type: string, baseId?: string) {
$e(`a:actions:import-${type}`)
const isOpen = ref(true)
@@ -172,6 +172,7 @@ function openQuickImportDialog(type: string) {
const { close } = useDialog(resolveComponent('DlgQuickImport'), {
'modelValue': isOpen,
'importType': type,
+ 'baseId': baseId || bases.value[0].id,
'onUpdate:modelValue': closeDialog,
})
@@ -182,13 +183,14 @@ function openQuickImportDialog(type: string) {
}
}
-function openAirtableImportDialog() {
+function openAirtableImportDialog(baseId?: string) {
$e('a:actions:import-airtable')
const isOpen = ref(true)
const { close } = useDialog(resolveComponent('DlgAirtableImport'), {
'modelValue': isOpen,
+ 'baseId': baseId || bases.value[0].id,
'onUpdate:modelValue': closeDialog,
})
@@ -200,15 +202,14 @@ function openAirtableImportDialog() {
}
function openTableCreateDialog(baseId?: string) {
- if (!baseId) return
$e('c:table:create:navdraw')
const isOpen = ref(true)
const { close } = useDialog(resolveComponent('DlgTableCreate'), {
'modelValue': isOpen,
+ 'baseId': baseId || bases.value[0].id,
'onUpdate:modelValue': closeDialog,
- 'baseId': baseId,
})
function closeDialog() {
@@ -301,7 +302,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
-
+
-
+