Skip to content

Commit

Permalink
Merge pull request #1552 from bartbutenaers/select-first-tab
Browse files Browse the repository at this point in the history
Group tabs - select first tab after navigation
  • Loading branch information
joepavitt authored Dec 23, 2024
2 parents d27fd37 + 8a14562 commit fbc2020
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions ui/src/layouts/Tabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit fbc2020

Please sign in to comment.