Skip to content

Commit b59105e

Browse files
committed
UI: Fix domain view when opening details for a specific domainid
1 parent 1e59f5c commit b59105e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

ui/src/views/iam/DomainView.vue

Lines changed: 8 additions & 1 deletion
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"
@@ -133,7 +134,13 @@ export default {
133134
},
134135
created () {
135136
this.domainStore = store.getters.domainStore
136-
this.fetchData()
137+
// When the route changes from /domain/:id to /domain or vice versa, the component is not destroyed and created again
138+
// So, we need to watch the route params to fetch the data again to update the component
139+
this.$watch(
140+
() => this.$route.params.id,
141+
this.fetchData,
142+
{ immediate: true }
143+
)
137144
eventBus.on('refresh-domain-icon', () => {
138145
if (this.$showIcon()) {
139146
this.fetchData()

0 commit comments

Comments
 (0)