Browse Source

Merge pull request #7822 from nocodb/nc-fix/incorrect-route-query-params

Nc fix(nc-gui): Incorrect route when navigating to view after visiting base members page
pull/7818/head
Raju Udava 9 months ago committed by GitHub
parent
commit
1ad4b079f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      packages/nc-gui/composables/useTableNew.ts

10
packages/nc-gui/composables/useTableNew.ts

@ -86,10 +86,7 @@ export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => v
const navigateToTable = async () => { const navigateToTable = async () => {
if (openedViewsTab.value === 'view') { if (openedViewsTab.value === 'view') {
await navigateTo({ await navigateTo(`/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}`)
path: `/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}`,
query: route.value.query,
})
} }
table.isViewsLoading = true table.isViewsLoading = true
@ -102,10 +99,7 @@ export function useTableNew(param: { onTableCreate?: (tableMeta: TableType) => v
// find the default view and navigate to it, if not found navigate to the first one // find the default view and navigate to it, if not found navigate to the first one
const defaultView = views.find((v) => v.is_default) || views[0] const defaultView = views.find((v) => v.is_default) || views[0]
await navigateTo({ await navigateTo(`/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}/${defaultView.id}/${openedViewsTab.value}`)
path: `/${workspaceIdOrType}/${baseIdOrBaseId}/${table?.id}/${defaultView.id}/${openedViewsTab.value}`,
query: route.value.query,
})
} }
} catch (e) { } catch (e) {
console.error(e) console.error(e)

Loading…
Cancel
Save