Skip to content

Commit

Permalink
feat(UX): Add optional trigger of route info definition on root compo…
Browse files Browse the repository at this point in the history
…nent load
  • Loading branch information
Eric Régnier committed Jan 7, 2020
1 parent 1c15e6d commit 4028dc9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/flows/FlowRoot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:title="tab.title"
>
<b-card-text>
<div :is="tab.tab" />
<div :is="tab.tab" :prevent-route-info="true" />
</b-card-text>
</b-tab>
</b-tabs>
Expand Down
10 changes: 9 additions & 1 deletion ui/src/mixins/routeContext.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export default {
props: {
preventRouteInfo : {
type: Boolean,
default: false
}
},
mounted() {
this.onLoad()
},
Expand All @@ -9,7 +15,9 @@ export default {
},
methods: {
onLoad() {
this.$store.commit('layout/setTopNavbar', this.routeInfo)
if (!this.preventRouteInfo) {
this.$store.commit('layout/setTopNavbar', this.routeInfo)
}
}
}
}

0 comments on commit 4028dc9

Please sign in to comment.