Compare commits

...

1 Commits

Author SHA1 Message Date
1424dec199 Fix the composition ids to be openmct identifiers (not keystrings) on load.
Track the domainobject name nested within a treeitem node
2023-07-24 12:59:13 -07:00
4 changed files with 11 additions and 8 deletions

View File

@ -74,7 +74,7 @@ export default class DefaultCompositionProvider extends CompositionProvider {
* the Identifiers in this composition
*/
load(domainObject) {
return Promise.all(domainObject.composition);
return Promise.all(domainObject.composition.map(this.publicAPI.objects.parseKeyString));
}
/**
* Attach listeners for changes to the composition of a given domain object.

View File

@ -62,11 +62,6 @@ export default {
default: ''
}
},
data() {
return {
domainObject: this.defaultObject
};
},
computed: {
path() {
return this.domainObject && (this.currentObjectPath || this.objectPath);

View File

@ -702,12 +702,19 @@ export default {
sortedTreeItems.splice(parentIndex + 1, 0, ...children);
});
// Splice in all of the sorted descendants
this.treeItems.splice(
// We need to reassign this.treeItems here since splice in place of all the sorted descendants doesn't seem to trigger a Vue update
let newTreeItems = this.treeItems.slice();
newTreeItems.splice(
this.treeItems.indexOf(parentItem) + 1,
sortedTreeItems.length,
...sortedTreeItems
);
this.treeItems = newTreeItems;
// this.treeItems.splice(
// this.treeItems.indexOf(parentItem) + 1,
// sortedTreeItems.length,
// ...sortedTreeItems
// );
},
buildNavigationPath(objectPath) {
return (

View File

@ -51,6 +51,7 @@
/>
<object-label
ref="objectLabel"
:title="node.object.name"
:domain-object="node.object"
:object-path="node.objectPath"
:navigate-to-path="navigationPath"