Files
openmct/src/ui/components/List/ListHeader.vue
Shefali Joshi 6153ad8e1e Add new timelist view and plugin (#4766)
* Add new timelist view and plugin
* Add inspector properties
* calculate list bounds to show/hide events
* Add timer to track 'Now' for timelist
* Styling for Timelist view

Co-authored-by: Charles Hacskaylo <charlesh88@gmail.com>
Co-authored-by: Nikhil <nikhil.k.mandlik@nasa.gov>
Co-authored-by: Jamie V <jamie.j.vigliotta@nasa.gov>
2022-04-05 14:48:32 -07:00

57 lines
1011 B
Vue

<template>
<th
v-if="isSortable"
class="is-sortable"
:class="{
'is-sorting': currentSort === property,
'asc': direction,
'desc': !direction
}"
@click="sort(property, direction)"
>
{{ title }}
</th>
<th v-else>
{{ title }}
</th>
</template>
<script>
export default {
inject: ['openmct'],
props: {
property: {
type: String,
required: true
},
currentSort: {
type: String,
required: true
},
title: {
type: String,
required: true
},
direction: {
type: Boolean,
required: true
},
isSortable: {
type: Boolean,
default() {
return false;
}
}
},
methods: {
sort(property, direction) {
this.$emit('sort', {
property,
direction
});
}
}
};
</script>