Skip to content

Commit

Permalink
fix(table): prevent table paginate unsafe property inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
mlmoravek committed Jan 21, 2025
1 parent ea2c7f1 commit c235f4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/oruga/src/components/table/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,10 @@ const hasCustomSubheadings = computed(() => {
function hasCustomFooterSlot(): boolean {
if (!slots.footer) return false;
const footer = slots.footer();
const footer = slots.footer({
columnCount: columnCount.value,
rowCount: visibleRows.value.length,
});
if (footer.length > 1) return true;
const tag = footer[0]["type"];
Expand Down Expand Up @@ -1365,7 +1368,9 @@ defineExpose({ rows: tableData, sort: sortByField });
:props="{ column, index }" />
</template>
<template v-else>
{{ column.subheading }}
<slot name="subheading">
{{ column.subheading }}
</slot>
</template>
</th>
<!-- checkable column right -->
Expand Down
1 change: 1 addition & 0 deletions packages/oruga/src/components/table/TablePagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ defineOptions({
isOruga: true,
name: "OTablePagination",
configField: "table",
inheritAttrs: false,
});
defineProps({
Expand Down

0 comments on commit c235f4f

Please sign in to comment.