@progress/kendo-vue-grid
Version:
9 lines (8 loc) • 2.13 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("vue"),n=require("@progress/kendo-vue-common"),l=s.defineComponent({name:"KendoGridRow",props:{rowType:String,isPinned:Boolean,item:Object,isAltRow:Boolean,isHidden:Boolean,isHighlighted:Boolean,onClick:Function,isInEdit:Boolean,isSelected:Boolean,selectedField:String,rowHeight:Number,ariaRowIndex:Number,absoluteRowIndex:Number,dataIndex:Number,render:[String,Function,Object],rows:Object,onRowclick:Function,onRowdblclick:Function},methods:{handleClick(e){this.$emit("rowclick",e)},handleDoubleClick(e){this.$emit("rowdblclick",e)}},computed:{trClass(){const{rowType:e,isAltRow:i,isInEdit:o,isHighlighted:r,isSelected:t,isPinned:d}=this.$props;return n.uGrid.tr({selected:t,highlighted:r,isHeader:e==="groupHeader",isFooter:e==="groupFooter",isMaster:e!=="groupHeader"&&e!=="groupFooter",isAltRow:i,isInEdit:o,isPinned:d})}},render(){const e=n.getDefaultSlots(this),i={onClick:this.handleClick,onDblclick:this.handleDoubleClick,class:this.trClass,style:{height:this.$props.rowHeight?this.$props.rowHeight+"px":"",visibility:this.$props.isHidden?"hidden":""},role:"row","aria-rowindex":this.$props.ariaRowIndex,"absolute-row-index":this.$props.absoluteRowIndex,"data-grid-row-index":this.$props.rowType==="data"?this.$props.dataIndex:void 0},o=s.createVNode("tr",i,[e]),r=this.$props.rowType||"data",t=this.$props.rows;return n.getTemplate.call(this,{h:s.h,template:this.$props.render||(t==null?void 0:t[r]),defaultRendering:o,additionalProps:{...this.$props,dataItem:this.$props.item.dataItem,trProps:i,defaultSlots:e},additionalListeners:{click:this.handleClick,dblclick:this.handleDoubleClick},defaultSlots:e,swapDefaultSlots:!0})}});exports.GridRow=l;