allow table row to control object path for context menu actions (#3232)

Need for changes in VISTA
This commit is contained in:
David Tsay 2020-07-24 10:41:36 -07:00 committed by GitHub
parent d9baa94970
commit 9124f4f566
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -74,6 +74,10 @@ define([], function () {
return this.cellLimitClasses;
}
getContextualDomainObject(openmct, objectKeyString) {
return openmct.objects.get(objectKeyString);
}
getContextMenuActions() {
return [];
}

View File

@ -171,7 +171,7 @@ export default {
showContextMenu: function (event) {
event.preventDefault();
this.openmct.objects.get(this.row.objectKeyString).then((domainObject) => {
this.row.getContextualDomainObject(this.openmct, this.row.objectKeyString).then(domainObject => {
let contextualObjectPath = this.objectPath.slice();
contextualObjectPath.unshift(domainObject);