@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
47 lines (46 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";
import * as a from "react";
import { useUnstyled as i, uGrid as u, Draggable as m, classNames as f } from "@progress/kendo-react-common";
const R = (e) => {
const n = a.useRef(null), c = (t) => {
const r = n.current && n.current.element;
r && e.pressHandler && e.pressHandler(t.event, r);
}, o = (t) => {
const r = n.current && n.current.element;
r && e.dragHandler && e.dragHandler(t.event, r);
}, s = (t) => {
n.current && n.current.element && e.releaseHandler && e.releaseHandler(t.event);
}, l = i(), d = l && l.uGrid ? l.uGrid : u;
return /* @__PURE__ */ a.createElement(
m,
{
onPress: c,
onDrag: o,
onRelease: s,
hint: e.dragClue,
autoScroll: { boundaryElementRef: e.headerRef, direction: { horizontal: !0, vertical: !1 } },
scrollContainer: e.containerRef || void 0,
ref: n
},
/* @__PURE__ */ a.createElement(
"tr",
{
className: f(d.simpleTr({})),
style: { touchAction: "none" },
role: "row",
"aria-rowindex": e.ariaRowIndex
},
e.children
)
);
};
export {
R as ColumnDraggable
};