From dc2386bb4b08edbedc25904ab7943fdbc0116a01 Mon Sep 17 00:00:00 2001 From: Joel Collins Date: Tue, 18 Feb 2020 17:14:32 +0000 Subject: [PATCH] Update plugins when icons are clicked --- src/components/genericComponents/tabIcon.vue | 8 ++++++++ src/components/panelLeft.vue | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/components/genericComponents/tabIcon.vue b/src/components/genericComponents/tabIcon.vue index 7c7014c4..d2159fcb 100644 --- a/src/components/genericComponents/tabIcon.vue +++ b/src/components/genericComponents/tabIcon.vue @@ -23,6 +23,11 @@ export default { type: String, required: true }, + clickCallback: { + type: Function, + required: false, + default: null + }, requireConnection: Boolean }, @@ -43,6 +48,9 @@ export default { methods: { setThisTab(event) { this.$emit("set-tab", event, this.id); + if (this.clickCallback) { + this.clickCallback(); + } } } }; diff --git a/src/components/panelLeft.vue b/src/components/panelLeft.vue index 972da19a..020a6512 100644 --- a/src/components/panelLeft.vue +++ b/src/components/panelLeft.vue @@ -50,6 +50,7 @@ :key="plugin.id" :require-connection="plugin.requiresConnection" :current-tab="currentTab" + :click-callback="updatePlugins" @set-tab="setTab" > {{ plugin.icon || "extension" }} @@ -115,6 +116,7 @@ :is-task="form.isTask" :submit-label="form.submitLabel" :schema="form.schema" + :emit-on-response="form.emitOnResponse" @reloadForms="updatePlugins()" />