Skip to content

Commit 2ea4dec

Browse files
Default ascending for first column only
1 parent 59d9bff commit 2ea4dec

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Frontend/src/components/monitoring/EndpointListColumnHeader.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import SortableColumn from "../SortableColumn.vue";
33
import { SortInfo } from "../SortInfo";
44
5-
withDefaults(
5+
const props = withDefaults(
66
defineProps<{
77
columnName: string;
88
columnSort: string;
@@ -15,11 +15,12 @@ withDefaults(
1515
);
1616
1717
const activeColumn = defineModel<SortInfo>({ required: true });
18+
const defaultAscending = props.isFirstCol ? true : undefined;
1819
</script>
1920

2021
<template>
2122
<div role="columnheader" :aria-label="columnName" :class="isFirstCol ? 'table-first-col' : 'table-col'">
22-
<SortableColumn :sort-by="columnSort" v-model="activeColumn" :default-ascending="true" v-tippy="toolTip">
23+
<SortableColumn :sort-by="columnSort" v-model="activeColumn" :default-ascending="defaultAscending" v-tippy="toolTip">
2324
{{ displayName }}<template v-if="displayUnit" #unit>&nbsp;{{ displayUnit }}</template>
2425
</SortableColumn>
2526
</div>

0 commit comments

Comments
 (0)