ensure browse bar gets plan name updates

This commit is contained in:
Scott Bell 2024-03-15 16:15:46 +01:00
parent 5fc5c13314
commit d173749cf5

View File

@ -274,6 +274,11 @@ export default {
this.domainObject.identifier,
this.setStatus
);
this.stopObservingNameChanges = this.openmct.objects.observe(
this.domainObject,
'*',
this.updateDomainObject
);
},
actionCollection(actionCollection) {
if (this.actionCollection) {
@ -294,10 +299,6 @@ export default {
});
},
beforeUnmount() {
if (this.mutationObserver) {
this.mutationObserver();
}
if (this.actionCollection) {
this.unlistenToActionCollection();
}
@ -306,6 +307,10 @@ export default {
this.removeStatusListener();
}
if (this.stopObservingNameChanges) {
this.stopObservingNameChanges();
}
document.removeEventListener('click', this.closeViewAndSaveMenu);
window.removeEventListener('beforeunload', this.promptUserbeforeNavigatingAway);
},
@ -325,6 +330,9 @@ export default {
updateNameOnEnterKeyPress(event) {
event.target.blur();
},
updateDomainObject(newDomainObject) {
this.domainObject = newDomainObject;
},
setView(view) {
this.viewKey = view.key;
this.openmct.router.updateParams({