mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
UI: Fix domain view when opening details for a specific domainid (#10245)
This commit is contained in:
parent
c70e4e29be
commit
0fbf6379f9
@ -56,6 +56,7 @@
|
||||
:loading="loading"
|
||||
:tabs="$route.meta.tabs" />
|
||||
<tree-view
|
||||
v-else
|
||||
:key="treeViewKey"
|
||||
:treeData="treeData"
|
||||
:treeSelected="treeSelected"
|
||||
@ -140,6 +141,15 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
'$route' (to, from) {
|
||||
// When the route changes from /domain/:id to /domain or vice versa, the component is not destroyed and created again
|
||||
// So, we need to watch the route params to fetch the data again to update the component
|
||||
if (to.path.startsWith('/domain') && from.params.id !== to.params.id) {
|
||||
this.fetchData()
|
||||
}
|
||||
}
|
||||
},
|
||||
provide () {
|
||||
return {
|
||||
parentCloseAction: this.closeAction,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user