From b1b17866ff4cee79d95ba448d72a7cfb31dc8755 Mon Sep 17 00:00:00 2001 From: Liana Harris <46411498+LianaHarris360@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:13:12 -0500 Subject: [PATCH 1/3] Add a rootId watcher to TreeViewBase --- .../channelEdit/views/TreeView/TreeViewBase.vue | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/TreeViewBase.vue b/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/TreeViewBase.vue index 4b3d75f26f..1e74155345 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/TreeViewBase.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/TreeViewBase.vue @@ -465,6 +465,12 @@ return DropEffect.COPY; }, }, + watch: { + rootId: { + handler: 'reloadChannel', + immediate: true, + }, + }, methods: { ...mapActions('channel', ['deleteChannel']), handleDelete() { @@ -491,6 +497,13 @@ trackClickEvent(eventLabel) { this.$analytics.trackClick('channel_editor_toolbar', eventLabel); }, + reloadChannel(id) { + if (!id) { + this.$store.dispatch('currentChannel/loadChannel').catch(error => { + throw new Error(error); + }); + } + }, }, $trs: { channelDetails: 'View channel details', From fac36cf5c0ffad01c50d77431f704111345ef799 Mon Sep 17 00:00:00 2001 From: Liana Harris <46411498+LianaHarris360@users.noreply.github.com> Date: Fri, 13 Sep 2024 11:13:33 -0500 Subject: [PATCH 2/3] implement conditional rendering of StudioTree based on the existence of rootId --- .../frontend/channelEdit/views/TreeView/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/index.vue b/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/index.vue index 38a17d2a0c..9d36a109aa 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/index.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/TreeView/index.vue @@ -89,7 +89,7 @@