@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
10 lines (9 loc) • 1.37 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
"use client";
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react"),y=require("../../utils/GridContext.js"),b=require("@progress/kendo-react-data-tools"),a=require("../hooks.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const c=g(f),C=e=>{const t=c.useContext(y.GridContext),o=b.useTableKeyboardNavigation(e.id),n=a.useContextMenuHandler(e.dataItem,e.field),l=a.usePositionStyle(e),u=c.useCallback(d=>{var r;(r=t==null?void 0:t.cellClick)==null||r.call(t,d,e.dataItem,e.field)},[t,e.dataItem,e.field]),i=e.rowType==="groupFooter"||e.rowType!=="groupHeader"?{onContextMenu:n}:{},s=e.rowType!=="groupFooter"&&e.rowType!=="groupHeader"?{style:l}:{};return{...o,...i,...s,onClick:u}};exports.useCellClientTdProps=C;