UNPKG

@progress/kendo-react-grid

Version:

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

51 lines (50 loc) 1.85 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 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 c } from "@progress/kendo-react-common"; import { GridContext as i } from "../utils/GridContext.mjs"; const f = (t) => { var s; const o = e.useRef(null), a = e.useRef(null), l = e.useContext(i); 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-${((s = c.sizeMap) == null ? void 0 : s[t.size]) || t.size}`]: t.size }, t.className ), role: "presentation" }, /* @__PURE__ */ e.createElement( "colgroup", { ref: (r) => { l.columnResizeRef.current.colGroupFooter = r; } }, t.cols ), /* @__PURE__ */ e.createElement("tfoot", { className: "k-table-tfoot", role: "presentation" }, t.row) ))) : /* @__PURE__ */ e.createElement("tfoot", { className: "k-table-tfoot" }, t.row); }; f.displayName = "KendoReactFooter"; export { f as Footer };