UNPKG

@progress/kendo-vue-data-tools

Version:
54 lines (53 loc) 1.53 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as r, h as s, createVNode as t } from "vue"; import { getDefaultSlots as o, getTemplate as a } from "@progress/kendo-vue-common"; const p = /* @__PURE__ */ r({ name: "KendoHeaderCell", props: { field: String, title: String, sortable: [Boolean, Object], render: [Object, Function, String], onHeadercellclick: Function, selectionValue: [String, Number, Boolean, Date] }, computed: { linkClass() { return { "k-link": !0, "!k-cursor-default": !this.sortable }; } }, methods: { clickHandler(e) { this.sortable && this.$emit("headercellclick", e); } }, render() { const e = o(this), l = this.$props.render, i = this.$props.title || this.$props.field || " ", n = a.call(this, { h: s, template: l, defaultRendering: i, additionalProps: this.$props, additionalListeners: { click: this.clickHandler } }); return t("span", { class: this.linkClass, onClick: this.clickHandler }, [t("span", { class: "k-column-title" }, [n]), e]); } }); export { p as HeaderCell };