diff --git a/packages/nc-gui/composables/useTableNew.ts b/packages/nc-gui/composables/useTableNew.ts index 0c945c8ddd..64a6530e8b 100644 --- a/packages/nc-gui/composables/useTableNew.ts +++ b/packages/nc-gui/composables/useTableNew.ts @@ -82,6 +82,8 @@ export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => v const views = viewsByTable.value.get(table.id as string) ?? [] + getMeta(table.id as string, (route.value.params?.viewId as string) !== table.id) + if (openedViewsTab.value !== 'view' && views[0].id) { await navigateTo({ path: `/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}/${views[0].id}/${openedViewsTab.value}`, @@ -92,8 +94,6 @@ export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => v path: `/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}`, query: route.value.query, }) - - await getMeta(table.id as string) } const createTable = async () => { diff --git a/packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue b/packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue index 58fae697f9..37469e5b56 100644 --- a/packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue +++ b/packages/nc-gui/pages/index/[typeOrId]/[baseId]/index/index/[viewId]/[[viewTitle]].vue @@ -20,7 +20,7 @@ watch( until(tables) .toMatch((tables) => tables.length > 0) .then(() => { - getMeta(viewId as string, true) + getMeta(viewId as string) }) }, { immediate: true },