From fdfef5012eed01c3db890edd27476280c2f4c911 Mon Sep 17 00:00:00 2001 From: sadnub Date: Sun, 24 Apr 2022 16:35:42 -0400 Subject: [PATCH] fix default tab not working if 'servers' is selected --- src/store/index.js | 2 +- src/views/Dashboard.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index c12d32f..e7877c0 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -23,7 +23,7 @@ export default function () { showCommunityScripts: false, agentDblClickAction: "", agentUrlAction: null, - defaultAgentTblTab: "server", + defaultAgentTblTab: null, clientTreeSort: "alphafail", clientTreeSplitter: 20, noCodeSign: false, diff --git a/src/views/Dashboard.vue b/src/views/Dashboard.vue index 2fdc458..530afdc 100644 --- a/src/views/Dashboard.vue +++ b/src/views/Dashboard.vue @@ -490,10 +490,12 @@ export default { selectedTree(newVal, oldVal) { if (this.clearSearchWhenSwitching) this.clearFilter(); }, + tab(newVal, oldVal) { + this.$store.dispatch("loadAgents"); + }, }, methods: { getTree() { - this.$store.dispatch("loadAgents"); this.$store.dispatch("loadTree"); }, clearTreeSelected() { @@ -707,7 +709,6 @@ export default { }, set(newVal) { this.$store.commit("SET_DEFAULT_AGENT_TBL_TAB", newVal); - this.$store.dispatch("loadAgents"); this.$store.commit("destroySubTable"); }, },