From 8a14562f76aa613c25f191337252ada997034920 Mon Sep 17 00:00:00 2001 From: bartbutenaers Date: Sat, 21 Dec 2024 08:42:30 +0100 Subject: [PATCH] select first tab after navigation --- ui/src/layouts/Tabs.vue | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/src/layouts/Tabs.vue b/ui/src/layouts/Tabs.vue index 224aafcb7..700cdb59b 100644 --- a/ui/src/layouts/Tabs.vue +++ b/ui/src/layouts/Tabs.vue @@ -70,6 +70,14 @@ export default { WidgetGroup }, mixins: [Responsiveness], + beforeRouteEnter (to, from, next) { + next(vm => { + // Select the first tabsheet every time the user arrives on this page + if (vm.orderedGroups && vm.orderedGroups.length > 0) { + vm.tab = 0 + } + }) + }, data () { return { tab: 0