@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
31 lines (30 loc) • 1.2 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 n from "react";
import { GridContext as s } from "../../utils/GridContext.mjs";
import { useTableKeyboardNavigation as d } from "@progress/kendo-react-data-tools";
import { useContextMenuHandler as y, usePositionStyle as f } from "../hooks.mjs";
const w = (e) => {
const t = n.useContext(s), a = d(e.id), l = y(e.dataItem, e.field), i = f(e), r = n.useCallback(
(m) => {
var o;
(o = t == null ? void 0 : t.cellClick) == null || o.call(t, m, e.dataItem, e.field);
},
[t, e.dataItem, e.field]
), u = e.rowType === "groupFooter" || e.rowType !== "groupHeader" ? { onContextMenu: l } : {}, c = e.rowType !== "groupFooter" && e.rowType !== "groupHeader" ? { style: i } : {};
return {
...a,
...u,
...c,
onClick: r
};
};
export {
w as useCellClientTdProps
};