@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
32 lines (31 loc) • 1.35 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 n from "react";
import { useLocalization as g } from "@progress/kendo-react-intl";
import { useTableKeyboardNavigation as b } from "@progress/kendo-react-data-tools";
import { GridContext as C } from "../../GridClientWrapper.mjs";
import { gridRowReorderAriaLabel as a, messages as w } from "../../messages/index.mjs";
import { cloneReactElement as x } from "../../utils/index.mjs";
const h = (t) => {
const { cellProps: o, rowReorderable: r } = t, { id: i, dataItem: l } = o, c = g(), e = n.useContext(C), s = b(i), m = r, d = c.toLanguageString(a, w[a]), u = () => m ? e.activeDragRowDataItemRef.current = l : null, f = n.useCallback(
(R) => {
e != null && e.onContextMenu && e.onContextMenu.call(void 0, R, o.dataItem, o.field);
},
[e, o.dataItem, o.field]
);
return t.children && x(t.children, {
"aria-label": d,
...s,
onMouseDown: u,
onContextMenu: f
});
};
export {
h as GridRowReorderCellContainer
};