Skip to content

Commit bafefdf

Browse files
Switch to $slots
1 parent 2dedc24 commit bafefdf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/Frontend/src/components/ColumnHeader.vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { computed, useSlots } from "vue";
2+
import { computed } from "vue";
33
import type { SortInfo } from "./SortInfo";
44
55
const props = withDefaults(
@@ -21,7 +21,6 @@ const props = withDefaults(
2121
}
2222
);
2323
24-
const slots = useSlots();
2524
const sortByColumn = computed(() => props.sortBy || props.name);
2625
const activeSortColumn = defineModel<SortInfo>();
2726
const isSortActive = computed(() => activeSortColumn?.value?.property === sortByColumn.value);
@@ -42,7 +41,7 @@ function toggleSort() {
4241
<span v-if="isSortActive">
4342
<i role="img" :class="sortIcon" :aria-label="sortIcon"></i>
4443
</span>
45-
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
44+
<tippy v-if="$slots.help" max-width="400px" :interactive="props.interactiveHelp">
4645
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
4746
<template #content>
4847
<slot name="help" />
@@ -55,7 +54,7 @@ function toggleSort() {
5554
{{ props.label }}
5655
<span v-if="props.unit" class="table-header-unit">{{ props.unit }}</span>
5756
</span>
58-
<tippy v-if="slots.help" max-width="400px" :interactive="props.interactiveHelp">
57+
<tippy v-if="$slots.help" max-width="400px" :interactive="props.interactiveHelp">
5958
<i class="fa fa-sm fa-info-circle text-primary ps-1" />
6059
<template #content>
6160
<slot name="help" />

0 commit comments

Comments
 (0)