UNPKG

@progress/kendo-vue-grid

Version:
88 lines (87 loc) 2.31 kB
/** * @license *------------------------------------------------------------------------------------------- * Copyright © 2026 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the package root for more information *------------------------------------------------------------------------------------------- */ import { defineComponent as l, createVNode as e, ref as o } from "vue"; import { isRtl as a } from "../utils/main.mjs"; import { setRef as r, getRef as s, kendoThemeMaps as i } from "@progress/kendo-vue-common"; const c = /* @__PURE__ */ l({ name: "Footer", props: { staticHeaders: Boolean, row: Object, columnResize: Object, cols: Array, size: String }, data() { return { scrollbarWidth: 0, rtl: !1, tableWidth: null }; }, computed: { tableClass() { const { size: t } = this.$props; return { "k-table": !0, "k-grid-footer-table": !0, [`k-table-${i.sizeMap[t] || t}`]: t }; }, tableStyle() { return this.tableWidth ? { width: this.tableWidth } : null; } }, mounted() { this.rtl = a(this.$el), this.$props.columnResize.colGroupFooter = s(this, "colGroupHeader"), this._footerWrap = s(this, "footerWrap"); }, methods: { setScrollLeft(t) { this._footerWrap && (this._footerWrap.scrollLeft = t); }, setWidth(t) { this.$data.tableWidth = t + "px"; } }, setup() { const t = o(null); return { colGroupHeaderRef: o(null), footerWrapRef: t }; }, render() { return this.$props.staticHeaders ? e("div", { class: "k-grid-footer", role: "presentation" }, [e("div", { class: "k-grid-footer-wrap", ref: r(this, "footerWrap"), role: "presentation" }, [e("table", { class: this.tableClass, style: this.tableStyle, role: "presentation" }, [e("colgroup", { ref: r(this, "colGroupHeader") }, [this.$props.cols]), e("tfoot", { class: "k-table-tfoot", role: "rowgroup" }, [this.$props.row])])])]) : e("tfoot", { class: "k-table-tfoot k-grid-footer", role: "rowgroup" }, [this.$props.row]); } }); export { c as Footer };