mirror of
https://github.com/nasa/openmct.git
synced 2025-03-14 16:26:50 +00:00
Display activity properties when an activity row is selected in the timelist
This commit is contained in:
parent
e47bfedaf7
commit
3c14025501
@ -27,6 +27,7 @@
|
||||
:header-items="headerItems"
|
||||
:default-sort="defaultSort"
|
||||
class="sticky"
|
||||
@item-selection-changed="setSelectionForActivity"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -491,6 +492,29 @@ export default {
|
||||
setEditState(isEditing) {
|
||||
this.isEditing = isEditing;
|
||||
this.setViewFromConfig(this.domainObject.configuration);
|
||||
},
|
||||
setSelectionForActivity(activity, element) {
|
||||
const multiSelect = false;
|
||||
|
||||
this.openmct.selection.select(
|
||||
[
|
||||
{
|
||||
element: element,
|
||||
context: {
|
||||
type: 'activity',
|
||||
activity: activity
|
||||
}
|
||||
},
|
||||
{
|
||||
element: this.openmct.layout.$refs.browseObject.$el,
|
||||
context: {
|
||||
item: this.domainObject,
|
||||
supportsMultiSelect: false
|
||||
}
|
||||
}
|
||||
],
|
||||
multiSelect
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -42,6 +42,7 @@
|
||||
:key="item.key"
|
||||
:item="item"
|
||||
:item-properties="itemProperties"
|
||||
@click="itemSelected(item, $event)"
|
||||
/>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -85,6 +86,7 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
emits: ['itemSelectionChanged'],
|
||||
data() {
|
||||
let sortBy = this.defaultSort.property;
|
||||
let ascending = this.defaultSort.defaultDirection;
|
||||
@ -155,6 +157,10 @@ export default {
|
||||
})
|
||||
);
|
||||
}
|
||||
},
|
||||
itemSelected(item, event) {
|
||||
event.stopPropagation();
|
||||
this.$emit('itemSelectionChanged', item, event.currentTarget);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user