Skip to content

Commit

Permalink
[AMORO-2413] Need to select the first db after switching to another C…
Browse files Browse the repository at this point in the history
…atalog (#2419)

* fix: If the current catalog is not the one in the query, the first db is selected by default.

* build dashboard frontend

---------

Co-authored-by: wangtao <wangtao3@corp.netease.com>
  • Loading branch information
minteliuwm and wangtaohz committed Dec 13, 2023
1 parent 82306a5 commit 24dbeed
Show file tree
Hide file tree
Showing 42 changed files with 113 additions and 111 deletions.
3 changes: 2 additions & 1 deletion ams/dashboard/src/components/tables-sub-menu/TablesMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ export default defineComponent({
}))
if (state.databaseList.length && !isSearch) {
const index = state.databaseList.findIndex(ele => ele.id === storageCataDBTable.database)
state.database = index > -1 ? storageCataDBTable.database : (route.query?.db)?.toString() || state.databaseList[0].id || ''
// ISSUE 2413: If the current catalog is not the one in the query, the first db is selected by default.
state.database = index > -1 ? storageCataDBTable.database : state.curCatalog === (route.query?.catalog)?.toString() ? ((route.query?.db)?.toString() || state.databaseList[0].id || '') : state.databaseList[0].id || ''
getAllTableList()
}
}).finally(() => {
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 24dbeed

Please sign in to comment.