From b2606afc1ee3b213761e710ee3081d5d12cb8a3f Mon Sep 17 00:00:00 2001 From: Kylan Hurt Date: Tue, 5 Dec 2023 14:36:04 -0300 Subject: [PATCH 1/8] Force account tab refreshes upon URL change --- src/components/BpVotes.vue | 9 +++++++-- src/components/ChildrenPanel.vue | 6 +++++- src/components/KeysPanel.vue | 6 +++++- src/components/TokensPanel.vue | 5 +++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/components/BpVotes.vue b/src/components/BpVotes.vue index c45baf16..0d8911d1 100644 --- a/src/components/BpVotes.vue +++ b/src/components/BpVotes.vue @@ -1,5 +1,5 @@ diff --git a/src/components/ChildrenPanel.vue b/src/components/ChildrenPanel.vue index fe941c37..39bbfdfa 100644 --- a/src/components/ChildrenPanel.vue +++ b/src/components/ChildrenPanel.vue @@ -2,7 +2,7 @@ import { useQuasar } from 'quasar'; import { api } from 'src/api'; import { Action, NewAccountData } from 'src/types'; -import { defineComponent, onMounted, ref } from 'vue'; +import { defineComponent, onMounted, ref, watch } from 'vue'; export default defineComponent({ name: 'ChildrenPanel', components: {}, @@ -29,6 +29,10 @@ export default defineComponent({ formatAccount((el.act.data as NewAccountData).newact, 'account'), ); }; + watch(()=> props.account, async () => { + children.value = []; + await loadAccountData(); + }); // TODO Refactor const formatAccount = ( name: string, diff --git a/src/components/KeysPanel.vue b/src/components/KeysPanel.vue index 278e9178..98aed1f9 100644 --- a/src/components/KeysPanel.vue +++ b/src/components/KeysPanel.vue @@ -1,7 +1,7 @@