@progress/kendo-react-grid
Version:
React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package
104 lines (103 loc) • 2.76 kB
JavaScript
/**
* @license
*-------------------------------------------------------------------------------------------
* Copyright © 2026 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the package root for more information
*-------------------------------------------------------------------------------------------
*/
import * as t from "react";
import { GridGroupCell as j } from "../cells/groupcell/GridGroupCell.mjs";
import { GridDetailHierarchyCell as q } from "../cells/GridDetailHierarchyCell.mjs";
import { StackedModeDetailRow as z } from "../stacked/StackedModeComponents.mjs";
const A = ({
isStackedMode: S,
detailRowId: d,
isHidden: l,
detailRowHeight: m,
ariaRowIndex: f,
item: a,
groupLevelCount: E,
groupDescriptors: e,
lockGroups: w,
cells: N,
leafColumns: P,
detailExpandableEnabled: I,
preparedCells: v,
DetailCell: y,
detail: h,
detailCellId: x,
detailHierarchyCellId: c,
detailTrClassName: G,
unstyled: C
}) => {
if (S)
return /* @__PURE__ */ t.createElement(
z,
{
detailRowId: d,
className: G,
isHidden: l,
detailRowHeight: m,
ariaRowIndex: f,
groupLevelCount: E,
dataItem: a.dataItem,
dataIndex: a.dataIndex,
detail: h,
id: x,
DetailCell: y
}
);
const K = P.length - (I ? 1 : 0) - ((e == null ? void 0 : e.length) || 0) || 1;
return /* @__PURE__ */ t.createElement(
"tr",
{
key: d,
className: G,
style: {
visibility: l ? "hidden" : "",
height: m
},
role: "row",
"aria-rowindex": f
},
e == null ? void 0 : e.map((i, k) => {
var o, R;
const n = (R = (o = v[k]) == null ? void 0 : o.props) == null ? void 0 : R.style, M = n ? { left: n.left, right: n.right } : {};
return /* @__PURE__ */ t.createElement(
j,
{
key: i.field,
cellProps: {
id: "",
dataItem: a.dataItem,
field: i.field,
dataIndex: a.dataIndex,
columnPosition: M,
style: {},
ariaColumnIndex: 1 + k,
isSelected: !1,
locked: w,
cells: N,
group: a.group
}
}
);
}),
I && c && /* @__PURE__ */ t.createElement(q, { unstyled: C, id: c }),
/* @__PURE__ */ t.createElement(
y,
{
dataItem: a.dataItem,
dataIndex: a.dataIndex,
colSpan: K,
ariaColIndex: 2 + ((e == null ? void 0 : e.length) || 0),
detail: h,
id: x
}
)
);
};
A.displayName = "KendoReactGridDetailRowRenderer";
export {
A as GridDetailRowRenderer
};