Skip to content

Commit d69a9b3

Browse files
vishesh92dhslove
authored andcommitted
UI: Fix domain view when opening details for a specific domainid (apache#10245)
1 parent 58b8d58 commit d69a9b3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ui/src/views/iam/DomainView.vue

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
:loading="loading"
5757
:tabs="$route.meta.tabs" />
5858
<tree-view
59+
v-else
5960
:key="treeViewKey"
6061
:treeData="treeData"
6162
:treeSelected="treeSelected"
@@ -140,6 +141,15 @@ export default {
140141
}
141142
})
142143
},
144+
watch: {
145+
'$route' (to, from) {
146+
// When the route changes from /domain/:id to /domain or vice versa, the component is not destroyed and created again
147+
// So, we need to watch the route params to fetch the data again to update the component
148+
if (to.path.startsWith('/domain') && from.params.id !== to.params.id) {
149+
this.fetchData()
150+
}
151+
}
152+
},
143153
provide () {
144154
return {
145155
parentCloseAction: this.closeAction,

0 commit comments

Comments
 (0)