Display activity properties when an activity row is selected in the timelist

This commit is contained in:
Shefali 2024-01-10 15:06:34 -08:00
parent e47bfedaf7
commit 3c14025501
2 changed files with 30 additions and 0 deletions

View File

@ -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
);
}
}
};

View File

@ -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);
}
}
};