Skip to content

Commit

Permalink
fix tabNames bug
Browse files Browse the repository at this point in the history
  • Loading branch information
flarco committed Aug 19, 2023
1 parent f0bd7fc commit 8b9ba71
Show file tree
Hide file tree
Showing 3 changed files with 385 additions and 5 deletions.
10 changes: 6 additions & 4 deletions frontend/src/components/TabNames.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@ export const createTab = (name: string = '', sql = '', connName: string, dbName:
if (index > -1) {
// tab already exists, append sql to bottom, or focus on existing
let tab = queryPanel().tabs[index]
tab.hidden.set(false) // if was hidden
appendSqlToTab(tab.id.get(), sql)
selectTab(tab.id.get());
return tab
if (tab.connection.get() === connName) {
tab.hidden.set(false) // if was hidden
appendSqlToTab(tab.id.get(), sql)
selectTab(tab.id.get());
return tab
}
}
let newTab = new Tab({
name,
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/dbnet-io/dbnet
go 1.19

require (
github.com/dbrest-io/dbrest v0.0.48
github.com/dbrest-io/dbrest v0.0.49
github.com/denisbrodbeck/machineid v1.0.1
github.com/flarco/dbio v0.3.248
github.com/flarco/g v0.1.61
Expand Down
Loading

0 comments on commit 8b9ba71

Please sign in to comment.