File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 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 ()
You can’t perform that action at this time.
0 commit comments