UNPKG

@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.25 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 client"; "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react"),C=require("@progress/kendo-react-intl"),m=require("@progress/kendo-react-data-tools"),w=require("../../GridClientWrapper.js"),n=require("../../messages/index.js"),q=require("../../utils/index.js"),x=o=>{const{cellProps:t,rowReorderable:a}=o,{id:i,dataItem:c}=t,l=C.useLocalization(),e=r.useContext(w.GridContext),s=m.useTableKeyboardNavigation(i),d=a,u=l.toLanguageString(n.gridRowReorderAriaLabel,n.messages[n.gridRowReorderAriaLabel]),R=()=>d?e.activeDragRowDataItemRef.current=c:null,g=r.useCallback(b=>{e!=null&&e.onContextMenu&&e.onContextMenu.call(void 0,b,t.dataItem,t.field)},[e,t.dataItem,t.field]);return o.children&&q.cloneReactElement(o.children,{"aria-label":u,...s,onMouseDown:R,onContextMenu:g})};exports.GridRowReorderCellContainer=x;