update selection views on edit state change

This commit is contained in:
Jamie V 2025-01-16 08:50:23 -08:00
parent b09b9e0b5b
commit 97292d4ba3

View File

@ -40,13 +40,15 @@ export default {
}, },
mounted() { mounted() {
this.updateSelectionViews(); this.updateSelectionViews();
this.openmct.editor.on('isEditing', this.updateSelectionViews);
this.openmct.selection.on('change', this.updateSelectionViews); this.openmct.selection.on('change', this.updateSelectionViews);
}, },
unmounted() { unmounted() {
this.openmct.editor.off('isEditing', this.updateSelectionViews);
this.openmct.selection.off('change', this.updateSelectionViews); this.openmct.selection.off('change', this.updateSelectionViews);
}, },
methods: { methods: {
updateSelectionViews(selection) { updateSelectionViews() {
this.clearViews(); this.clearViews();
this.selectedViews = this.openmct.inspectorViews.get(this.openmct.selection.get()); this.selectedViews = this.openmct.inspectorViews.get(this.openmct.selection.get());
this.showViewsForTab(); this.showViewsForTab();