@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
39 lines (38 loc) • 1.45 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 C } from "../../utils/GridContext.mjs";
import { cloneReactElement as l } from "../../utils/index.mjs";
import { useGroupCellClientTdProps as u } from "./useGroupCellClientTdProps.mjs";
import { useLegacyCellProps as s } from "../hooks.mjs";
const f = (e) => {
const { cellProps: o, renderToggleCell: r } = e, i = n.useContext(C), t = u(o, r), c = s(o);
if (e.isCustom)
return i.isClient || e.isClient ? l(e.children, {
// pass down to tdProps for client templates
tdProps: e.tdProps ? {
...e.tdProps,
...t
} : null,
td2Props: e.td2Props ? {
...e.td2Props,
onContextMenu: t.onContextMenu
} : null,
...c
}) : l(e.children, {
...t
});
const d = e.td2Props ? /* @__PURE__ */ n.createElement("td", { ...e.td2Props, onContextMenu: t.onContextMenu }) : null;
return /* @__PURE__ */ n.createElement(n.Fragment, null, e.children && l(e.children, {
...t
}), d);
};
export {
f as GridGroupCellServerContainer
};