UNPKG

@progress/kendo-react-grid

Version:

React Data Grid (Table) provides 100+ ready-to-use data grid features. KendoReact Grid package

52 lines (51 loc) 1.88 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"; import * as e from "react"; import { classNames as n, kendoThemeMaps as s } from "@progress/kendo-react-common"; import { GridContext as c } from "../utils/GridContext.mjs"; const i = (t) => { const o = e.useRef(null), a = e.useRef(null), l = e.useContext(c); return e.useImperativeHandle(l.footerRef, () => ({ setScrollLeft: (r) => { o.current && (o.current.scrollLeft = r); }, setWidth: (r) => { a.current && (a.current.style.width = r ? r + "px" : ""); } })), t.staticHeaders ? /* @__PURE__ */ e.createElement("div", { className: "k-grid-footer", role: "presentation" }, /* @__PURE__ */ e.createElement("div", { ref: o, className: "k-grid-footer-wrap", role: "presentation" }, /* @__PURE__ */ e.createElement( "table", { ref: a, className: n( "k-table k-grid-footer-table", { "k-table-md": !t.size, [`k-table-${s.sizeMap[t.size] || t.size}`]: t.size }, t.className ), role: "presentation" }, /* @__PURE__ */ e.createElement( "colgroup", { ref: (r) => { l.columnResizeRef.current.colGroupFooter = r; }, role: "presentation" }, t.cols ), /* @__PURE__ */ e.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, t.row) ))) : /* @__PURE__ */ e.createElement("tfoot", { className: "k-table-tfoot" }, t.row); }; i.displayName = "KendoReactFooter"; export { i as Footer };