fix: wrong loaded schema change

This commit is contained in:
Fabio Di Stasio 2021-07-21 17:56:55 +02:00
parent e6ef5ffa56
commit c41e059b0b
9 changed files with 12 additions and 10 deletions

View File

@ -41,7 +41,7 @@
</form>
</div>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<button class="btn btn-primary mr-2" @click.stop="sendCredentials">
{{ $t('word.send') }}
</button>

View File

@ -53,7 +53,7 @@
</form>
</div>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<button class="btn btn-primary mr-2" @click.stop="updateSchema">
{{ $t('word.update') }}
</button>

View File

@ -52,7 +52,7 @@
</form>
</div>
</div>
<div class="modal-footer text-light columns">
<div class="modal-footer columns">
<div class="column d-flex" :class="hasFakes ? 'col-4' : 'col-2'">
<div class="input-group tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')">
<input

View File

@ -49,7 +49,7 @@
</form>
</div>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<button
class="btn btn-primary mr-2"
:class="{'loading': isLoading}"

View File

@ -86,7 +86,7 @@
</form>
</div>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<div class="input-group col-3 tooltip tooltip-right" :data-tooltip="$t('message.numberOfInserts')">
<input
v-model="nInserts"

View File

@ -273,6 +273,7 @@ export default {
methods: {
...mapActions({
changeBreadcrumbs: 'workspaces/changeBreadcrumbs',
addLoadedSchema: 'workspaces/addLoadedSchema',
newTab: 'workspaces/newTab',
refreshSchema: 'workspaces/refreshSchema'
}),
@ -281,6 +282,7 @@ export default {
if (!this.loadedSchemas.has(schema) && !this.isLoading) {
this.isLoading = true;
await this.refreshSchema({ uid: this.connection.uid, schema });
this.addLoadedSchema(schema);
this.isLoading = false;
}

View File

@ -326,7 +326,7 @@
:status="toast.status"
/>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<button
class="btn btn-gray mr-2"
:class="{'loading': isTesting}"

View File

@ -333,7 +333,7 @@
</div>
</div>
</div>
<div class="modal-footer text-light">
<div class="modal-footer">
<button
class="btn btn-gray mr-2"
:class="{'loading': isTesting}"

View File

@ -513,9 +513,9 @@ export default {
};
commit('CHANGE_BREADCRUMBS', { uid: getters.getSelected, breadcrumbs: { ...breadcrumbsObj, ...payload } });
if (payload.schema)
commit('ADD_LOADED_SCHEMA', { uid: getters.getSelected, schema: payload.schema });
},
addLoadedSchema ({ commit, getters }, schema) {
commit('ADD_LOADED_SCHEMA', { uid: getters.getSelected, schema });
},
setSearchTerm ({ commit, getters }, term) {
commit('SET_SEARCH_TERM', { uid: getters.getSelected, term });