@1771technologies/lytenyte-pro
Version:
Blazingly fast headless React data grid with 100s of features.
20 lines (19 loc) • 700 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
export function CellRowGroup({ column, row, grid }) {
if (grid.api.rowIsLeaf(row))
return _jsx("div", {});
const multi = grid.state.rowGroupDisplayMode.get() === "multi-column";
if (multi) {
const index = grid.api.rowGroupColumnIndex(column);
if (index !== row.depth)
return _jsx("div", {});
}
return (_jsx("div", { onClick: () => grid.api.rowGroupToggle(row), style: {
display: "flex",
alignItems: "center",
width: "100%",
height: "100%",
paddingInline: "8px",
boxSizing: "border-box",
}, children: row.key }));
}