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 * the Identifiers in this composition
*/ */
load(domainObject) { 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. * Attach listeners for changes to the composition of a given domain object.

View File

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

View File

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

View File

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