Files
openmct/src/ui/mixins/object-link.js
Andrew Henry 517a40a32b Tree Performance Fixes (#2353)
* Disable disclosure triangle transition

* Reduce number of times navigation path is calculated
2019-04-05 09:44:38 -07:00

26 lines
613 B
JavaScript

export default {
inject: ['openmct'],
props: {
'objectPath': {
type: Array,
default() {
return [];
}
}
},
computed: {
objectLink() {
if (!this.objectPath.length) {
return;
}
if (this.navigateToPath) {
return '#' + this.navigateToPath;
}
return '#/browse/' + this.objectPath
.map(o => o && this.openmct.objects.makeKeyString(o.identifier))
.reverse()
.join('/');
}
}
};