Hi. The documentation (https://www.telerik.com/kendo-vue-ui/components/grid/custom-rendering/custom-headers/) shows how to make custom headers, but there is no example of a custom header with functional sorted colums (like the first grid on this page -> https://www.telerik.com/kendo-vue-ui/components/grid/sorting/ ).
I want to have a custom header template and I also want to click on it to sort the column. I actually managed to do that, but the arrows are missing. Here's a code sample:
<template #headerTemplate="{props}">
<span @click="headerTemplateClickHandler(props)">{{ props.title }}</span>
</template>
headerTemplateClickHandler(props){
const existentRuleIndex = this.sort.findIndex(rule => rule.field === props.field);
if (existentRuleIndex >= 0) {
this.sort[existentRuleIndex ].dir =
this.sort[existentRuleIndex ].dir === "desc" ? "asc" : "desc";
} else{
this.sort.push({
dir: 'desc',
field: props.field
})
}
props.sortchange({
sort: this.sort
});
}
With this code I managed to sort the column, but the arrow indicators do not show up in the header.