UNPKG

@progress/kendo-react-treelist

Version:

React TreeList enables the display of self-referencing tabular data. KendoReact TreeList package

9 lines (8 loc) 1.52 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2025 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("react"),c=require("@progress/kendo-react-common"),u=require("@progress/kendo-react-data-tools");function m(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,n.get?n:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const l=m(s),i=e=>{const a=l.useCallback(r=>{e.selectionChange&&e.selectionChange({syntheticEvent:r})},[e.selectionChange]),t=c.useId(),n=c.getNestedValue(e.field,e.dataItem),d=u.useTableKeyboardNavigation(e.id),o=l.createElement("td",{style:e.style,className:c.classNames("k-table-td",e.className),"aria-colindex":e.ariaColumnIndex,role:"gridcell",...d},l.createElement("input",{checked:typeof n=="boolean"&&n,id:t,type:"checkbox",className:"k-checkbox k-checkbox-md k-rounded-md",onChange:a}),l.createElement("label",{className:"k-checkbox-label",htmlFor:t}));return e.render?e.render.call(void 0,o,e):o};i.displayName="KendoReactTreeListSelectionCell";exports.TreeListSelectionCell=i;