Skip to content

Commit dc6d61c

Browse files
authored
Merge pull request #14493 from assuntad23/14200/bug/update_history_in_collection
watching historyID for change, if it changes, close the CollectionPanel
2 parents a43eb43 + 083ca72 commit dc6d61c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

client/src/components/History/CurrentCollection/CollectionPanel.vue

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,14 @@ export default {
8383
return this.dsc.contents_url.substring(1);
8484
},
8585
},
86+
watch: {
87+
history(newHistory, oldHistory) {
88+
if (newHistory.id != oldHistory.id) {
89+
// Send up event closing out selected collection on history change.
90+
this.$emit("update:selected-collections", []);
91+
}
92+
},
93+
},
8694
methods: {
8795
updateDsc(collection, fields) {
8896
updateContentFields(collection, fields).then((response) => {

0 commit comments

Comments
 (0)