mirror of
https://github.com/Fabio286/antares.git
synced 2025-02-08 07:48:40 +01:00
feat: default open schema if only one present
This commit is contained in:
parent
5e4abd3e81
commit
0fa22fbe72
@ -52,6 +52,7 @@
|
||||
<WorkspaceExploreBarSchema
|
||||
v-for="db of workspace.structure"
|
||||
:key="db.name"
|
||||
ref="schema"
|
||||
:database="db"
|
||||
:connection="connection"
|
||||
@show-schema-context="openSchemaContext"
|
||||
@ -259,6 +260,11 @@ export default {
|
||||
window.addEventListener('mousemove', this.resize);
|
||||
window.addEventListener('mouseup', this.stopResize);
|
||||
});
|
||||
|
||||
if (this.workspace.structure.length === 1) { // Auto-open if juust one schema
|
||||
this.$refs.schema[0].selectSchema(this.workspace.structure[0].name);
|
||||
this.$refs.schema[0].$refs.schemaAccordion.open = true;
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async refresh () {
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<details class="accordion workspace-explorebar-database">
|
||||
<details ref="schemaAccordion" class="accordion workspace-explorebar-database">
|
||||
<summary
|
||||
class="accordion-header database-name"
|
||||
:class="{'text-bold': breadcrumbs.schema === database.name}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user