@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.59 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 m=require("react"),b=require("../../utils/GridContext.js"),r=require("@progress/kendo-react-common"),I=require("@progress/kendo-react-intl"),o=require("../../messages/index.js");function g(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const c=g(m),k=e=>{var i;const t=c.useContext(b.GridContext),n=r.useId(),a=I.useLocalization(),l=(i=e.isSelected)!=null?i:r.getNestedValue(e.field,e.dataItem),d=typeof l=="boolean"&&l,u=c.useCallback(s=>{t==null||t.selectionChange({event:s,dataItem:e.dataItem,dataIndex:e.rowDataIndex,columnIndex:e.columnIndex})},[t,e.columnIndex,e.rowDataIndex,e.dataItem]);return c.createElement("span",{className:"k-checkbox-wrap"},c.createElement("input",{id:n,tabIndex:-1,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md","aria-label":a.toLanguageString(o.selectRow,o.messages[o.selectRow]),"aria-checked":d,checked:d,onChange:u}))};exports.GridSelectionCellInput=k;