@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.53 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 d=require("react"),c=require("@progress/kendo-react-common");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=m(d),g=e=>{const t=s.useRef(null),n=a=>{const r=t.current&&t.current.element;r&&e.pressHandler&&e.pressHandler(a.event,r)},l=a=>{const r=t.current&&t.current.element;r&&e.dragHandler&&e.dragHandler(a.event,r)},u=a=>{t.current&&t.current.element&&e.releaseHandler&&e.releaseHandler(a.event)},o=c.useUnstyled(),i=o&&o.uGrid?o.uGrid:c.uGrid;return s.createElement(c.Draggable,{onPress:n,onDrag:l,onRelease:u,hint:e.dragClue,autoScroll:{boundaryElementRef:e.headerRef,direction:{horizontal:!0,vertical:!1}},scrollContainer:e.containerRef||void 0,ref:t},s.createElement("tr",{className:c.classNames(i.simpleTr({})),style:{touchAction:"none"},role:"row","aria-rowindex":e.ariaRowIndex},e.children))};exports.ColumnDraggable=g;