UNPKG

@progress/kendo-vue-grid

Version:
66 lines (65 loc) 2.33 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 i, createVNode as r, h as s } from "vue"; import { getNestedValue as l } from "../utils/main.mjs"; import { getDefaultSlots as d, getTemplate as n } from "@progress/kendo-vue-common"; const h = /* @__PURE__ */ i({ name: "KendoGridRow", props: { rowType: String, dataItem: Object, isAltRow: Boolean, isHidden: Boolean, onClick: Function, isInEdit: Boolean, isSelected: Boolean, selectedField: String, rowHeight: Number, ariaRowIndex: Number, dataIndex: Number, render: [String, Function, Object], onRowclick: Function, onRowdblclick: Function }, methods: { handleClick(e) { this.$emit("rowclick", e); }, handleDoubleClick(e) { this.$emit("rowdblclick", e); } }, render() { const e = d(this), t = this.$props.rowType === "groupFooter" || this.$props.rowType === "groupHeader" ? this.$props.rowType === "groupFooter" && "k-group-footer" || "k-table-group-row k-grouping-row" : (this.$props.isAltRow ? "k-table-alt-row k-master-row k-alt" : "k-master-row") + (this.$props.selectedField !== void 0 && l(this.$props.selectedField, this.$props.dataItem) ? " k-selected" : ""), o = r("tr", { onClick: this.handleClick, onDblclick: this.handleDoubleClick, class: "k-table-row " + t, style: { height: this.$props.rowHeight ? this.$props.rowHeight + "px" : "", visibility: this.$props.isHidden ? "hidden" : "" }, role: "row", "aria-rowindex": this.$props.ariaRowIndex, "data-grid-row-index": this.$props.rowType === "data" ? this.$props.dataIndex : void 0 }, [e]); return n.call(this, { h: s, template: this.$props.render, defaultRendering: o, additionalProps: this.$props, additionalListeners: { click: this.handleClick }, defaultSlots: e, swapDefaultSlots: !0 }); } }); export { h as GridRow };